Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Comma in number in msgbox

How would I format the the display of a msgbox to get this result:

You have $2,145.50 worth of inventory!

The value 2145.5 is in the activecell, for example or in a variable, Amt.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Comma in number in msgbox

Hi,
Try something like:

dim strValue as string

strvalue=Format( val(activecell.value), "$#,###.00")
strValue= "The value " & strValue & " is in the activecell, for example or
in a variable, Amt."

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Mike H." wrote:

How would I format the the display of a msgbox to get this result:

You have $2,145.50 worth of inventory!

The value 2145.5 is in the activecell, for example or in a variable, Amt.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Comma in number in msgbox

MsgBox Application.Dollar(12345)


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mike H." wrote in message
...
How would I format the the display of a msgbox to get this result:

You have $2,145.50 worth of inventory!

The value 2145.5 is in the activecell, for example or in a variable, Amt.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I place a comma after each number in a column corinnecarter Excel Discussion (Misc queries) 1 January 8th 10 06:14 PM
Inserting comma(,) after every two digits of a number from right t Senapati Excel Worksheet Functions 2 October 28th 09 11:55 AM
Extract name before comma, space & number SherryScrapDog Excel Discussion (Misc queries) 3 January 26th 09 02:46 AM
HOW DO I PUT 'COMMA' IN NUMBER, AS I WISH Meena Setting up and Configuration of Excel 1 February 23rd 07 04:33 PM
using VBA in Excel it changes the dot of a number to a comma abygorb Excel Programming 4 September 13th 06 06:06 AM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"