Skip to main content

How to add thousand separators to numbers in Word documents?

Author: Sun Last Modified: 2024-07-04

Adding thousand separators to numbers in a Word document can greatly enhance readability, especially when dealing with large figures. While Microsoft Word does not have a direct feature for adding thousand separators, there are efficient methods to achieve this using VBA (Visual Basic for Applications) or a handy tool like Kutools for Word.

In this tutorial, we will guide you through the steps to add thousand separators to numbers in your Word document using both VBA and Kutools for Word.

Add thousand separators with VBA

Add thousand separators with Kutools for Wordgood idea3


Add thousand separators with VBA

Sometimes, one number needed to be inserted several thousand separators. In this case, you can use VBA code.

1. Select the number you want to insert thousand separators, press Alt + F11 keys to open Microsoft Visual basic for Applications window.

2. Click Insert > Module, copy and paste below code to the Module.

VBA: Add thousand separators to number

Sub AddCommasToNumbers()
'UpdatebyExtendoffice20181106
    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

3. Press F5 key, thousand separators have been inserted to the selected number.
doc add thousand separator 3


Add thousand separators with Kutools for Word

If you want to insert separators to multiple numbers in selection or the whole document in Word, the Add Thousand Separator utility of Kutools for Word can solve this job by clicks.

Kutools for Word, equipped with AI 🤖, offers over 100 handy features to simplify your tasks.

After installing Kutools for Word, please do as below:(Free Download Kutools for Word Now!)

For adding thousand separators to all numbers in the whole document, do no select any data, and click Kutools > Add Thousand Separator.
doc add thousand separator 4

Some dialogs pop out to ensure if you want to apply this function to the whole document, click Yes > OK.
doc add thousand separator 5 doc add thousand separator 6

Now all numbers have been inserted thousand separators.
doc add thousand separator 7

If you want to add thousand separators to numbers in selection, select the numbers and click Kutools > Add Thousand Separator.
doc add thousand separator 8

Note: If you want to remove the thousand separators, you can click Kutools > Remove > Remove Thousand Separator.

Discover the Kutools / Kutools Plus tab in this video from Kutools for Word. Enjoy 100+ features and permanently free AI utilities. Download now!

Best Office Productivity Tools

Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!

🤖 Kutools AI Assistant: Transform your writing with AI - Generate Content  /  Rewrite Text  /  Summarize Documents  /  Get Quick Answers, all within Word

📘 Document Mastery: Split Pages  /  Merge Documents  /  Export Selection in Various Formats (PDF/TXT/DOC/HTML...)  /  Batch Convert to PDF  /  Export Pages as Images  /  Print Multiple Files at once...

Contents Editing: Batch Find and Replace across Multiple Files  /  Resize All Pictures  /  Transpose Table Rows and Columns  /  Convert Table to Text...

🧹 Effortless Clean: Sweap away Extra Spaces  /  Section Breaks  /  All Headers  /  Text Boxes  /  Hyperlinks  /  For more removing tools, head to the Remove group...

Creative Inserts: Insert Thousand Separators  /  Check Boxes  /  Radio Buttons  /  QR Code  /  Barcode  /  Diagonal Line Table  /  Equation Caption  /  Image Caption  /  Table Caption  /  Multiple Pictures  /  Discover more in the Insert group...

🔍 Precision Selections: Pinpoint Specific Pages  /  Tables  /  Shapes  /  Heading Paragraphs  /  Enhance navigation with more Select features...

Star Enhancements: Navigate to Any Location  /  Auto-Insert Repetitive Text  /  Toggle Between Document Windows  /  11 Conversion Tools...

Kutools and Kutools Plus tabs on the Word Ribbon
👉 Want to try these features? Download Kutools for Word now! 🚀
 
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi
A simpler way is just to copy "002C" and paste in the "character code" box and click insert.
no need to select Verdana or Basic Latin
This comment was minimized by the moderator on the site
Thanks for your macro. But it has two problem:
1) After using macro, leading zero of numbers like phone number will be removed!!!
2) Macro works bad for number with more than 30 digits.!!!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations