To add a thousand separators to numbers in a Word document, you can use different methods. Here are some tricks on handling this task in Word:
Add Thousand Separator with Shortcuts:
- Place the cursor at the location where you want to insert the thousand separator.
- Press the
Alt
key and type044
using the number keyboard.
Add Thousand Separator with Symbol:
- Place the cursor where you want to insert the thousand separator.
- Go to
Insert
>Symbol
>More Symbols
. - In the Symbol dialog, select “Verdana” from the Font drop-down list and “Basic Latin” from the Subset drop-down list.
- Choose the thousand separator from the list and click
Insert
.
Add Thousand Separator with VBA:
- Select the number you want to insert thousand separators into.
- Press
Alt + F11
to open the Visual Basic for Applications (VBA) window. - Click
Insert
>Module
and copy and paste the provided VBA code into the module.
Sub AddCommasToNumbers()
Dim xWarp As Integer
If Selection.Type = wdSelectionIP Then
ActiveDocument.Range(0, 0).Select
xWarp = wdFindContinue
Else
xWarp = wdFindStop
End If
With Selection.Find
.ClearFormatting
.Text = “[0-9]{4,}”
.Replacement.Text = “”
.Forward = True
.Wrap = xWarp
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
Do While .Execute
Selection.Text = Format$(Selection.Text, “#,##0”)
If xWarp = wdFindContinue Then
Selection.Collapse wdCollapseEnd
Else
Exit Sub
End If
Loop
End With
End Sub
Press F5
to run the code. Thousand separators will be inserted into the selected number.
These methods allow you to insert thousand separators either manually, symbolically, or by using VBA code depending on your specific requirements.