Reply
 
Thread Tools Display Modes
  #1   Report Post  
CMD@WTMA
 
Posts: n/a
Default currency with auto decimal and comma separator in a table

How do I get a cell to automatically convert a number to currency with a
decimal point and comma separators? I do not need a formula in the cell I
would just like to type a number, say 5000, and have it automatically convert
to 5,000.00.
  #2   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

This is not possible in Word (without a formula field) unless you embed an
Excel sheet.

--
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.

"CMD@WTMA" wrote in message
...
How do I get a cell to automatically convert a number to currency with a
decimal point and comma separators? I do not need a formula in the cell I
would just like to type a number, say 5000, and have it automatically

convert
to 5,000.00.


  #3   Report Post  
Greg Maxey
 
Posts: n/a
Default

As Suzanne says, it isn't possible (without a field). You could type the
number and then fire the following macro with an keyboard shortcut:

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
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.

Suzanne S. Barnhill wrote:
This is not possible in Word (without a formula field) unless you
embed an Excel sheet.


"CMD@WTMA" wrote in message
...
How do I get a cell to automatically convert a number to currency
with a decimal point and comma separators? I do not need a formula
in the cell I would just like to type a number, say 5000, and have
it automatically convert to 5,000.00.



  #4   Report Post  
Jim
 
Posts: n/a
Default

Suzanne:

Can you give me some guidance on where I can learn about formula fields. I
have been through the entries in the Help menu and I do not understand. I
think I know what they're trying to say, but with few examples it is really
hard to put into application.

Thanks for any help you can give.
--
Jim


"Suzanne S. Barnhill" wrote:

This is not possible in Word (without a formula field) unless you embed an
Excel sheet.

--
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.

"CMD@WTMA" wrote in message
...
How do I get a cell to automatically convert a number to currency with a
decimal point and comma separators? I do not need a formula in the cell I
would just like to type a number, say 5000, and have it automatically

convert
to 5,000.00.



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

I don't see any way that a formula field will do what you want.

--
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
...
Suzanne:

Can you give me some guidance on where I can learn about formula fields. I
have been through the entries in the Help menu and I do not understand. I
think I know what they're trying to say, but with few examples it is

really
hard to put into application.

Thanks for any help you can give.
--
Jim


"Suzanne S. Barnhill" wrote:

This is not possible in Word (without a formula field) unless you embed

an
Excel sheet.

--
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.

"CMD@WTMA" wrote in message
...
How do I get a cell to automatically convert a number to currency with

a
decimal point and comma separators? I do not need a formula in the

cell I
would just like to type a number, say 5000, and have it automatically

convert
to 5,000.00.




Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump


All times are GMT +1. The time now is 10:18 AM.

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"