Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? RussAllison Excel Discussion (Misc queries) 1 February 24th 11 02:22 AM
Worksheet not displaying "Sum" in lover right corner LMRS1 Excel Discussion (Misc queries) 2 December 5th 09 09:38 PM
Formating numbers &"Text" to appear as currency &"Text" in formula Robin K. Excel Discussion (Misc queries) 6 May 7th 07 02:03 PM
In Excel a cell formatted "currency" shows "######" help! llveda Excel Worksheet Functions 2 April 7th 06 09:39 PM
Changing format of column from "general" to "currency" Old Car Excel Programming 1 April 29th 05 09:49 AM


All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"