Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a co-worker who is extracting data from SQL Server,
and using VB to create a spreadsheet. Everything is working fine, except for the fact that he can't seem to get the CURRENCY values to format within the spreadsheet. He can get them to appear as numbers, with decimals but not in CURRENCY format. Any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
xlApp.ActiveWorkbok.Activesheet.Range("A1").Style = "Currency"
you may have other objects that point to the book/sheet/range, so just adjust to suit. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Ed" wrote in message ... I have a co-worker who is extracting data from SQL Server, and using VB to create a spreadsheet. Everything is working fine, except for the fact that he can't seem to get the CURRENCY values to format within the spreadsheet. He can get them to appear as numbers, with decimals but not in CURRENCY format. Any ideas? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try formatting the columns that the data appears in or
you could use a range as your selection. Here modify the columns to your need or change the selection to a range: Columns("D:P").Select Selection.NumberFormat = "$#,##0" Regards, Alex. -----Original Message----- I have a co-worker who is extracting data from SQL Server, and using VB to create a spreadsheet. Everything is working fine, except for the fact that he can't seem to get the CURRENCY values to format within the spreadsheet. He can get them to appear as numbers, with decimals but not in CURRENCY format. Any ideas? . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good chance that they are being stored as Text. If so, you can't currency
format text. -- Regards, Tom Ogilvy Ed wrote in message ... I have a co-worker who is extracting data from SQL Server, and using VB to create a spreadsheet. Everything is working fine, except for the fact that he can't seem to get the CURRENCY values to format within the spreadsheet. He can get them to appear as numbers, with decimals but not in CURRENCY format. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 format cells to date format | Excel Discussion (Misc queries) | |||
How to format cells in Excel 2007 (i.e. currency format)? | Excel Discussion (Misc queries) | |||
want format cells alignment not format cells font style | Excel Discussion (Misc queries) | |||
Cells won't convert to number format, even after format/cells/num. | Excel Discussion (Misc queries) | |||
How to format cells in Excel for time in format mm:ss.00 | Excel Worksheet Functions |