Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2003, WinXP
Programming: I have a cell variable FoundCell. The value of FoundCell is 1.2. It can be any numerical value. FoundCell is formatted as Currency, dollar sign 2 places, so the cell appears as $1.20. I want to put this value into a MsgBox and have it appear as $1.20 IOW, I want MsgBox FoundCell.Value to produce $1.20 I tried using Len(Application.WorksheetFunction.Mod..........) to determine the length of the remainder so I could append zeros as needed but I don't thing the worksheet Mod function will work in this manner. I tried Application.WorksheetFunction.Text.... and that didn't work. Is there a way to do this? Thanks for your help. Otto |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi again Otto,
Try MsgBox Format(FoundCell.Value,"$#,##0.00") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Otto Moehrbach" wrote in message ... Excel 2003, WinXP Programming: I have a cell variable FoundCell. The value of FoundCell is 1.2. It can be any numerical value. FoundCell is formatted as Currency, dollar sign 2 places, so the cell appears as $1.20. I want to put this value into a MsgBox and have it appear as $1.20 IOW, I want MsgBox FoundCell.Value to produce $1.20 I tried using Len(Application.WorksheetFunction.Mod..........) to determine the length of the remainder so I could append zeros as needed but I don't thing the worksheet Mod function will work in this manner. I tried Application.WorksheetFunction.Text.... and that didn't work. Is there a way to do this? Thanks for your help. Otto |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
msgbox FoundCell.Text
is another way. -- Regards, Tom Ogilvy Otto Moehrbach wrote in message ... Excel 2003, WinXP Programming: I have a cell variable FoundCell. The value of FoundCell is 1.2. It can be any numerical value. FoundCell is formatted as Currency, dollar sign 2 places, so the cell appears as $1.20. I want to put this value into a MsgBox and have it appear as $1.20 IOW, I want MsgBox FoundCell.Value to produce $1.20 I tried using Len(Application.WorksheetFunction.Mod..........) to determine the length of the remainder so I could append zeros as needed but I don't thing the worksheet Mod function will work in this manner. I tried Application.WorksheetFunction.Text.... and that didn't work. Is there a way to do this? Thanks for your help. Otto |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob, Tom
What can I say? Thanks again. Otto "Tom Ogilvy" wrote in message ... msgbox FoundCell.Text is another way. -- Regards, Tom Ogilvy Otto Moehrbach wrote in message ... Excel 2003, WinXP Programming: I have a cell variable FoundCell. The value of FoundCell is 1.2. It can be any numerical value. FoundCell is formatted as Currency, dollar sign 2 places, so the cell appears as $1.20. I want to put this value into a MsgBox and have it appear as $1.20 IOW, I want MsgBox FoundCell.Value to produce $1.20 I tried using Len(Application.WorksheetFunction.Mod..........) to determine the length of the remainder so I could append zeros as needed but I don't thing the worksheet Mod function will work in this manner. I tried Application.WorksheetFunction.Text.... and that didn't work. Is there a way to do this? Thanks for your help. Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting number | Excel Discussion (Misc queries) | |||
Number Formatting | Excel Discussion (Misc queries) | |||
number formatting help | Excel Discussion (Misc queries) | |||
formatting cell number based on previous cell number | Excel Discussion (Misc queries) | |||
Formatting number in VBA | Excel Programming |