Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying Currency numbers (e.g. "CAD 1,999") on worksheet
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying Currency numbers (e.g. "CAD 1,999") on worksheet
On Tue, 18 Aug 2009 17:10:01 -0700, FSPH
wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying Currency numbers (e.g. "CAD 1,999") on worksheet
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. "Ron Rosenfeld" wrote: On Tue, 18 Aug 2009 17:10:01 -0700, FSPH wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying Currency numbers (e.g. "CAD 1,999") on worksheet
On Wed, 19 Aug 2009 15:07:01 -0700, FSPH
wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? | Excel Discussion (Misc queries) | |||
Worksheet not displaying "Sum" in lover right corner | Excel Discussion (Misc queries) | |||
Formating numbers &"Text" to appear as currency &"Text" in formula | Excel Discussion (Misc queries) | |||
In Excel a cell formatted "currency" shows "######" help! | Excel Worksheet Functions | |||
Changing format of column from "general" to "currency" | Excel Programming |