ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   currency conversion (https://www.excelbanter.com/excel-discussion-misc-queries/4222-currency-conversion.html)

Nevi

currency conversion
 
Hi,

I am trying to convert Canadian dollars into USD in the same cells where the
values are entered, i.e. I do not want to insert another column where I can
write a formula. How can i do that?

Gary Rowe

put the currency conversion number in a cell outside the range of numbers you
want changed. Click on that number and then copy. Then click on the range
on numbers you want changed and click Edit/paste special and select the
multiply option and hit enter and all the numbers will be multiplied by the
conversion number.
Gary

"Nevi" wrote:

Hi,

I am trying to convert Canadian dollars into USD in the same cells where the
values are entered, i.e. I do not want to insert another column where I can
write a formula. How can i do that?


Peo Sjoblom

You need an event macro for this if you want conversion whne you have entered
the US currency

Put this code in a sheet module

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Range("A2"), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Value = Target.Value * 1.22738
Application.EnableEvents = True
End Sub


Replace the * value with the current rate

cell in question is A2, adapt to fit


Regards,

Peo Sjoblom



"Nevi" wrote:

Hi,

I am trying to convert Canadian dollars into USD in the same cells where the
values are entered, i.e. I do not want to insert another column where I can
write a formula. How can i do that?



All times are GMT +1. The time now is 09:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com