Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a macro that takes a value from an excel spreadsheet and insert it into a work document at a bookmark. The number is a currency and I' like it to be entered in the work document in this format..... £xx,xxx,xxx.xx rather than £xxxxxxxx.xx which is what currentl happens, the script I am using is this... appWD.ActiveDocument.Bookmarks("ValueNumber").Rang e Format(strValueNumber, "£0.00") 'strValueNumber is from the excel spreadsheet 'ValueNumber is the bookmark in the word document How would I (if it's possible) modify this to add the commas in -- ChrisMattoc ----------------------------------------------------------------------- ChrisMattock's Profile: http://www.excelforum.com/member.php...fo&userid=3391 View this thread: http://www.excelforum.com/showthread.php?threadid=54704 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sure, just use the format "£#,##0.00"
ChrisMattock wrote: I have a macro that takes a value from an excel spreadsheet and inserts it into a work document at a bookmark. The number is a currency and I'd like it to be entered in the work document in this format..... £xx,xxx,xxx.xx rather than £xxxxxxxx.xx which is what currently happens, the script I am using is this... appWD.ActiveDocument.Bookmarks("ValueNumber").Rang e = Format(strValueNumber, "£0.00") 'strValueNumber is from the excel spreadsheet 'ValueNumber is the bookmark in the word document How would I (if it's possible) modify this to add the commas in? -- ChrisMattock ------------------------------------------------------------------------ ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912 View this thread: http://www.excelforum.com/showthread...hreadid=547047 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks, just in case anyone else is reading this the currency symbol, in this case pound sign replaces the A3 that somehow appears in this thread. Formatting - Yawn. Thanks again! -- ChrisMattock ------------------------------------------------------------------------ ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912 View this thread: http://www.excelforum.com/showthread...hreadid=547047 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting with imported data | Excel Discussion (Misc queries) | |||
Formatting Imported Data | Excel Discussion (Misc queries) | |||
eliminating trailing zeroes imported into word document from excel file | Excel Discussion (Misc queries) | |||
Formatting Imported Text | Excel Discussion (Misc queries) | |||
Why is Excel sheet concatenated when imported into Word? | Excel Discussion (Misc queries) |