Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jim
 
Posts: n/a
Default How to format cells in a table for currency

I have created a table in Word 2000. 90% of the entries will be text that I
need to manipulate, so I don't want to use an Excel table becuase it limits
my text formatting.

However, one column of the table will be all currency entries. How can I
format the cells for currency? I.E. if I enter 358760, it displays as
$3,587.60.

Thanks for any help
--
Jim
  #2   Report Post  
Greg Maxey
 
Posts: n/a
Default

Jim,

You could do this using a protected form where the fields in the one column
where format with a currency format switch. Another opition is to run a
macro to format the desired (say selected) cells before printing or
distributing a smooth document. Something like this may work for you:

Sub ConvertSelectedRawNumbersInTableToCurrencyFormat()

If Not Selection.Information(wdWithInTable) Then
MsgBox "Place cursor in a table cell or select multiple cells."
Exit Sub
End If

Dim oCl As Word.Cell
Dim oRng As Range
Dim Count As Integer
For Each oCl In Selection.Cells
Set oRng = oCl.Range
oRng.End = oRng.End - 1
With oRng
If IsNumeric(oRng) Then
.Text = FormatCurrency _
(Expression:=.Text, _
NumDigitsAfterDecimal:=2, _
IncludeLeadingDigit:=vbTrue, _
UseParensForNegativeNumbers:=vbTrue)
End If
If IsNumeric(oRng) = False Then
Count = Count + 1
End If
End With
Next oCl
If Count = 0 Then
MsgBox "Conversion complete."
End If
Selection.Collapse wdCollapseEnd
If Count = 1 Then
MsgBox "The selected cell is empty or content is not numerical.", ,
"Notice!!"
End If
If Count 1 Then
MsgBox "" & Count & " of the selected cells are empty or content is not
numerical. Conversion complete on all selected numerical cells.", ,
"Notice!!"
End If
End Sub

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

Jim wrote:
I have created a table in Word 2000. 90% of the entries will be text
that I need to manipulate, so I don't want to use an Excel table
becuase it limits my text formatting.

However, one column of the table will be all currency entries. How
can I format the cells for currency? I.E. if I enter 358760, it
displays as $3,587.60.

Thanks for any help



  #3   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

This can't be done without a field.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jim" wrote in message
...
I have created a table in Word 2000. 90% of the entries will be text that

I
need to manipulate, so I don't want to use an Excel table becuase it

limits
my text formatting.

However, one column of the table will be all currency entries. How can I
format the cells for currency? I.E. if I enter 358760, it displays as
$3,587.60.

Thanks for any help
--
Jim


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I set a default table format? Portia Tables 4 April 29th 05 08:42 AM
Protect table cells in Word format from hard returns laralea Microsoft Word Help 3 April 26th 05 08:11 PM
Can I freeze the size and format of table cells then type in the . Rudy1 Tables 6 March 23rd 05 02:32 PM
Table AutoFormats vs. Table Styles confusion Tony Jollans Tables 5 March 6th 05 07:18 PM
Getting the format of a table Kind writer/user/programmer Tables 0 October 29th 04 02:52 AM


All times are GMT +1. The time now is 02:40 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"