View Single Post
 
Old 06-09-2014, 10:26 AM
kd12 kd12 is offline Windows 7 64bit Office 2013
Banned
 
Join Date: Jun 2014
Location: Massachusetts
Posts: 10
kd12 is on a distinguished road
Default

Create a macro. It takes a little bit of effort, but then it will be super super easy.

I can't take the credit for this macro, it comes from here: http://ask.brothersoft.com/how-do-i-...le-113359.html
  • From the Developer tab, click the Macros button.
  • From the Macros in drop-down list, select Normal.dotm (this will make this macro available in all of your documents not just this one.
  • Enter a name for the Macro
  • Click the Create button.
  • The editor window opens.
  • Paste the following into the editor:
Code:
Sub CurrencyTableFormat() 
     '
     ' CurrencyTableFormat Macro
     '
     '
    Dim tCell As Word.Cell 
    Dim tRange As Range 
    If Selection.Type = wdSelectionIP Or Not Selection.Information(wdWithInTable) Then 
        MsgBox "Select numerical values in tables cells before running this macro.", , "Error" 
        Exit Sub 
    End If 
    For Each tCell In Selection.Cells 
        Set tRange = tCell.Range 
        tRange.End = tRange.End - 1 
        With tRange 
            If IsNumeric(tRange) Then 
                .Text = FormatCurrency(Expression:=.Text) 
            End If 
            On Error Goto Skip 
Skip: 
        End With 
    Next tCell 
End Sub
  • Save and close
  • Highlight the two columns, and run the macro
NOTE: The editor will have the "Sub [TITLE], the [TITLE] Macro and the End Sub lines already filled in, so you really just need to copy from Dim to tCell. Or you can use the title I used and just copy the whole thing

Last edited by macropod; 06-13-2014 at 03:46 PM. Reason: Added code tags & formatting
Reply With Quote