Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
formatting a variable
Is there anyway to formatt a variable?
so instead of seeing: x = 10000 the variable ='s x = 10,000 Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
formatting a variable
Use the Format() function
Format(varName,"$#,##0.00") or Format(varName,"#,##0.00") The # symbol in the mask meansif there's a value at this position, display/print it, otherwise leave blank, while the 0 in the format mask means if there is no value at this position, place as 0. -- Kevin Backmann "dstiefe" wrote: Is there anyway to formatt a variable? so instead of seeing: x = 10000 the variable ='s x = 10,000 Thank you |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
formatting a variable
I'm getting a compile error when I use the ( )?
"Kevin B" wrote: Use the Format() function Format(varName,"$#,##0.00") or Format(varName,"#,##0.00") The # symbol in the mask meansif there's a value at this position, display/print it, otherwise leave blank, while the 0 in the format mask means if there is no value at this position, place as 0. -- Kevin Backmann "dstiefe" wrote: Is there anyway to formatt a variable? so instead of seeing: x = 10000 the variable ='s x = 10,000 Thank you |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
formatting a variable
The parenthesis are needed when there is a condition involved. i.e. x =
format(x,"$#,##0.00"). -- JNW "dstiefe" wrote: I'm getting a compile error when I use the ( )? "Kevin B" wrote: Use the Format() function Format(varName,"$#,##0.00") or Format(varName,"#,##0.00") The # symbol in the mask meansif there's a value at this position, display/print it, otherwise leave blank, while the 0 in the format mask means if there is no value at this position, place as 0. -- Kevin Backmann "dstiefe" wrote: Is there anyway to formatt a variable? so instead of seeing: x = 10000 the variable ='s x = 10,000 Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formatting a two-variable data table | Excel Worksheet Functions | |||
Conditional Formatting using variable text | Excel Discussion (Misc queries) | |||
Set formatting variable | Excel Programming | |||
Stuffing Numeric Variable Values into Footnote with formatting | Excel Programming | |||
Formatting a Variable | Excel Programming |