Displaying Currency numbers (e.g. "CAD 1,999") on worksheet

  • Thread starter Thread starter FSPH
  • Start date Start date
F

FSPH

Hi there,

instead of programming

Cells(Row,Column) = Number(1)
where Number(1) = 1999

I would like to indicate numbers as different currencies and make us of a
comma as the "1000 Separator". For example, "1999" should be written as "CAD
1,999".

How could I program this? What are the commands to use?

Thank you for your help.
 
Hi there,

instead of programming

Cells(Row,Column) = Number(1)
where Number(1) = 1999

I would like to indicate numbers as different currencies and make us of a
comma as the "1000 Separator". For example, "1999" should be written as "CAD
1,999".

How could I program this? What are the commands to use?

Thank you for your help.

Perhaps:

With Cells(Row, Column)
.Value = Num(1)
.NumberFormat = """CAD "" #,##0.00"
End With

--ron
 
Thank you for your input.

Fair enough, this code will allow me to write "CAD values" to the worksheet.

What do I have to do if I want to load a column in a worksheet that contains
numbers of various currencies (say, CAD and USD) which I would like to
preserve?

Price = Worksheets(Worksheet).Cells(Row, Column)

Could I assign to Price (data type Currency?) CAD or USD numbers and then
continue my calculation based on these currencies?

Thank you for your help.
 
Thank you for your input.

Fair enough, this code will allow me to write "CAD values" to the worksheet.

What do I have to do if I want to load a column in a worksheet that contains
numbers of various currencies (say, CAD and USD) which I would like to
preserve?

Price = Worksheets(Worksheet).Cells(Row, Column)

Could I assign to Price (data type Currency?) CAD or USD numbers and then
continue my calculation based on these currencies?

Thank you for your help.

I'm not sure of your setup. But I think the only issue you would have is
keeping track of whether you are dealing with USD or CAD. And also you might
want to keep track of the conversion factor on certain dates.
--ron
 
Back
Top