Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wendy Francis
 
Posts: n/a
Default thousands comma separator in VBA

Hi
I have variables defined in an Excel macro as Long, and I want them to
return the value in a Word Report with thousand comma separators - is there
a way of doing this please?
Wendy Francis



  #2   Report Post  
ShaunM
 
Posts: n/a
Default thousands comma separator in VBA


Hi Wendy

You can use FormatNumber() to format your variable before you produce
your report.

eg. YourVariable = FormatNumber(YourNum, , , , vbTrue)

Regards
Shaun


--
ShaunM
------------------------------------------------------------------------
ShaunM's Profile: http://www.excelforum.com/member.php...o&userid=18610
View this thread: http://www.excelforum.com/showthread...hreadid=478646

  #3   Report Post  
Wendy Francis
 
Posts: n/a
Default thousands comma separator in VBA

That's brilliant Shaun. Thanks very much.

Wendy


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
Importing a part of a big comma delimited csv-file smari Excel Worksheet Functions 0 October 6th 05 02:32 PM
Count comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM
A cell contains "1,2,3"; and I want to count those sep. by comma Mahendra Excel Discussion (Misc queries) 2 August 4th 05 05:18 PM
Comma is not visible in Excel DrNASA Excel Discussion (Misc queries) 1 March 10th 05 04:51 PM
HELP - I need to change space delimited to comma? Mayer Excel Discussion (Misc queries) 1 December 18th 04 06:21 PM


All times are GMT +1. The time now is 11:20 PM.

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"