View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dstiefe dstiefe is offline
external usenet poster
 
Posts: 73
Default 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