Home |
Search |
Today's Posts |
#11
![]() |
|||
|
|||
![]()
Anil:
Is there a way to format a number in a msgbox if it is: 1) preceded by text, & 2) calculated in the code, not drawn from a worksheet? I want to display a message similar to this example ("The sum is: ") with the number in 123,456 format. I am able to format the number alone using the following code, but I can't figure out how to add "The sum is: " and retain the comma formatting. MsgBox prompt:=Format(expression:=totalvar, Format:="0,0") Thank you for any suggestions! Elizabeth "anilsolipuram" wrote: Yes use format(sheets("Sheet3").Range("p2").Value,"#.##") this will give two decimal places MsgBox "The Average is" & format(sheets("Sheet3").Range("p2").Value,"#.##") -- anilsolipuram ------------------------------------------------------------------------ anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271 View this thread: http://www.excelforum.com/showthread...hreadid=382585 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculations And Order In Macros | Excel Discussion (Misc queries) | |||
when opening excel I receive a message that says file can't be fo. | Excel Discussion (Misc queries) | |||
changing the message in an error message | Excel Worksheet Functions | |||
Error Message appearing when saving a file | Excel Discussion (Misc queries) | |||
#num! error message | Excel Worksheet Functions |