Share via

Word for Mac Number Format for column in a table

Anonymous
2014-11-20T15:55:59+00:00

I use tables in lieu of a separate excel spreadsheet.  I would like to format an entire column as currency.  Is there a way to set the default for number format of all cells in a column of a table within a Word document that way?  For now, I've been formatting each cell separately.

thanks.

Microsoft 365 and Office | Word | For home | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Bob Jones AKA CyberTaz MVP 435.3K Reputation points
    2014-11-20T18:50:21+00:00

    For all practical intent there's nothing in Word that is what you're looking for... Unlike a spreadsheet, a word processing document makes no distinction between values & text strings -- everything is text, so there are no Number formats such as you'd find in Excel. Number Formats can be applied only to Formula Fields.

    What can be done is to insert each number as a Formula Field by using Table> Formula or by using the Command+F9 keystroke to insert the field then typing the field code, such as:

    { =sum(50000,0) # "$#,##0.00;($#,##0.00)"****}

    IMO that's far more trouble than it's worth :-) Typically, the currency symbols, commas, etc. are typed along with the digits. If including a calculation (such as summing at the bottom of a column) the Number format for that field would be specified in the Table> Formula dialog.

    To me, it's much more efficient to build & format the table in Excel then copy it into the document. If there is to be no revision that requires updating of calculations it can simply be pasted as a Word table, which is the default. Otherwise, use Edit> Paste Special - Microsoft Excel Worksheet Object. [Note: Once you copy, leave the Excel file open while you switch to Word to paste. Otherwise the Paste Special option won't be available.]

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments

Answer accepted by question author

  1. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2014-11-21T22:51:53+00:00

    The following macro formats all of a table, or just the selected cells, in a two-decimal format, with or without a $ symbol.

    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

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Bob Jones AKA CyberTaz MVP 435.3K Reputation points
    2014-11-21T23:00:58+00:00

    ... or maybe some clever coder can provide a VBA solution :-) Nice piece of work, Paul!

    Was this answer helpful?

    0 comments No comments
  2. Suzanne S Barnhill 277.4K Reputation points MVP Volunteer Moderator
    2014-11-20T16:38:47+00:00

    Since you specify Word for Mac, I'm moving your post to the Word for Mac forum and assuming it's Word for Mac 2011. If not, please correct the "Applies to."

    Was this answer helpful?

    0 comments No comments