32131232424q2
IS-IT--Management
hi,
I've been asked to automate an excel facility to do the following:
px-last=fx-rate (multiply or divide by currency rate) and if currency = gbp then divide gbp rate by 100 first
Whether to multiply or divide depends on the currency
Currency PX_LAST FX Rate Fx Table
JPY 4,810.0000 104.0000 EUR EUR Curncy 1.3000 M
EUR 16.0000 1.5000 GBP GBP Curncy 1.9957
CHF CHF Curncy 1.0023
SEK SEK Curncy 5.8490
NOK NOK Curncy 4.9527
CAD CAD Curncy 1.0059
JPY JPY Curncy 104.7600
HKD HKD Curncy 7.7934
SGD SGD Curncy 1.3501
Whether to multiply or divide by depends on the currency. I can write a vba case statement as I think this would be much clearer than nested ifs, but I don’t know how to get column b within excel to to refer to colum c.
Using a formula I’d simply use:
$b2=$c2….
$b3=$c3..
And so on
Not sure how to do this within vba
Any help much appreciated.
thx
I've been asked to automate an excel facility to do the following:
px-last=fx-rate (multiply or divide by currency rate) and if currency = gbp then divide gbp rate by 100 first
Whether to multiply or divide depends on the currency
Currency PX_LAST FX Rate Fx Table
JPY 4,810.0000 104.0000 EUR EUR Curncy 1.3000 M
EUR 16.0000 1.5000 GBP GBP Curncy 1.9957
CHF CHF Curncy 1.0023
SEK SEK Curncy 5.8490
NOK NOK Curncy 4.9527
CAD CAD Curncy 1.0059
JPY JPY Curncy 104.7600
HKD HKD Curncy 7.7934
SGD SGD Curncy 1.3501
Whether to multiply or divide by depends on the currency. I can write a vba case statement as I think this would be much clearer than nested ifs, but I don’t know how to get column b within excel to to refer to colum c.
Using a formula I’d simply use:
$b2=$c2….
$b3=$c3..
And so on
Not sure how to do this within vba
Any help much appreciated.
thx