View Single Post
  #1   Report Post  
rgarber50
 
Posts: n/a
Default display cell value in msgbox formatted as %


Hi
I have been trying to come up with a way to display a cell value in a
msgbox so that it formats properly as a percent.

I have tried:

Productivity = Format(Range("A1").Value, "###,# %")
Msgbox Productivity

This always gives me a leading 0 (e.g 015%) and I want it to display
15.0%.

So I tried this:
Productivity = Format(CStr(Range("A1").Value) * 100, "#,###.0") & "%"
and it works ok but...
I want to use the value of productivity in computations - which I can't
formatted as a string ... Am I missing something - or is it as simple as
declaring a separate numeric variable for productivity?

Thanks

Richard


--
rgarber50
------------------------------------------------------------------------
rgarber50's Profile: http://www.excelforum.com/member.php...o&userid=11350
View this thread: http://www.excelforum.com/showthread...hreadid=385873