![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Is there a way to have the thousand separator in the tables of Words as we do in Excel??
please, see the attached file that shows my question. i need to have comma thousand separator in the table of word, but i couldn't know how to do it..! regards Jamal |
#2
|
||||
|
||||
![]()
Hi Jamal,
If you want that facility, you can embed and Excel worksheet into the document. Alternatively, you can input the values into the table, then run a macro like: Code:
Sub DecimalFormatter() Dim Rslt, RsDz, oCel As Cell, Rng As Range If Selection.Information(wdWithInTable) = False Then MsgBox "Cannot run outside a table", vbExclamation, "Decimal Formatter" Exit Sub End If Rslt = MsgBox("Format the whole table?", vbYesNoCancel, "Decimal Formatter") If Rslt = vbCancel Then Exit Sub RsDz = MsgBox("Apply currency formatting?", vbYesNo, "Decimal Formatter") If RsDz = vbNo Then RsDz = "" If RsDz = vbYes Then RsDz = "$" If Rslt = vbNo Then For Each oCel In Selection.Cells Set Rng = oCel.Range With Rng .End = .End - 1 If IsNumeric(.Text) Then .Text = Format(.Text, RsDz & "#,##0.00") End With Next End If If Rslt = vbYes Then For Each oCel In Selection.Tables(1).Range.Cells Set Rng = oCel.Range With Rng .End = .End - 1 If IsNumeric(.Text) Then .Text = Format(.Text, RsDz & "#,##0.00") End With Next End If End Sub For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thank you Paul. that's great
Regards Jamal |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Decimal tabs with space as thousands separator | harry | Word | 1 | 12-22-2023 02:59 PM |
Why Words doesn’t show the style of the selected words automatically???? | Jamal NUMAN | Word | 0 | 04-14-2011 03:20 PM |
How to 'forbid' bad words? | andre20 | Word | 5 | 06-14-2010 08:35 PM |
![]() |
taylormayd | Excel | 3 | 02-20-2009 03:46 AM |
![]() |
microsoftmonkey | Outlook | 1 | 11-24-2008 09:29 AM |