Word Table-Automatically show a $ in the money column?

C

Charitychic

In Word, I have made a table with names of donors, their address, and the
amounts they donated. One column is money amounts...I would like to just type
in say, 25 and have it come out as $25. How do I get the $ in there
automatically?
 
S

Suzanne S. Barnhill

There's really no simple way to do this in Word except by embedding an Excel
sheet. The only way to create a "number mask" in Word is through field
switches, and that requires that you be using a field. If the money amount
was a form field, you could define the format, but you would have to protect
the document for forms.
 
S

Stefan Blom

Word doesn't allow you to specify numeric formats for table cell contents.

What you can do is make use of text form fields, whose formats can be
specified, and then enable forms protection. For more on using forms in
Word, see http://word.mvps.org/faqs/customization/FillinTheBlanks.htm.

The easiest approach, however, might be to embed an Excel spreadsheet in
your Word document, using the spreadsheet instead of a Word table.
 
G

Graham Mayor

While Excel is possibly the simplest solution, it is posible to convert
numbers to fields using a macro. The following macro will format as currency
the number in the table cell that contains the cursor. Attached to a
keyboard shortcut it is as near 'automatic' as you will get. The resulting
fields can be calculated, unlike plain text entries with currency symbols.

Sub FormatNumberInCellAsField()
Dim sNum As String
With Selection
.SelectCell
.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
sNum = .Text
If sNum = "" Then Exit Sub
sNum = sNum & " \# ,$0.00"
With .Fields
.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
Text:="= " & sNum, _
PreserveFormatting:=False
.Update
End With
End With
ActiveWindow.View.ShowFieldCodes = False
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top