Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Susan Sia Susan Sia is offline
external usenet poster
 
Posts: 1
Default How do I set numeric and date formats in a table in Word?


--
Susan
  #2   Report Post  
Posted to microsoft.public.word.tables
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default How do I set numeric and date formats in a table in Word?

That can only be done via field codes in Word. A simple example would be
this: { = 35 \# "000.00" } which would display as "035.00" in your document
(assuming that your system is using the period as a decimal sign). You can
read more about the formula (=) field in Word Help.

--
Stefan Blom
Microsoft Word MVP



"Susan Sia" .(donotspam) wrote in message
...

--
Susan



  #3   Report Post  
Posted to microsoft.public.word.tables
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How do I set numeric and date formats in a table in Word?

It can also be done with a macro in which you can set your required formats
e.g.

Sub FormatNumberAsText()
Dim sNum As String
sNum = Selection
If sNum = "" Then Exit Sub
sNum = format(sNum, "$###,###,###,###.##")
Selection.TypeText sNum
End Sub

or as a field

Sub FormatNumberAsField()
Dim sNum As String
sNum = Selection
If sNum = "" Then Exit Sub
sNum = sNum & " \# $,0.00"
With Selection.Fields
.Add Range:=Selection.Range, Type:=wdFieldExpression, _
Text:=sNum, _
PreserveFormatting:=False
.Update
End With
ActiveWindow.View.ShowFieldCodes = False
End Sub


Select 35 and run the macro and either will enter $35.00

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Stefan Blom wrote:
That can only be done via field codes in Word. A simple example would
be this: { = 35 \# "000.00" } which would display as "035.00" in your
document (assuming that your system is using the period as a decimal
sign). You can read more about the formula (=) field in Word Help.


"Susan Sia" .(donotspam) wrote in message
...

--
Susan



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
Mail merge date field formats in word Slim Mailmerge 2 December 20th 07 02:02 PM
Wrong Date formats in Word Header/Footer pagoni Microsoft Word Help 1 September 18th 07 11:22 AM
Numeric formats sabinss Mailmerge 4 December 22nd 05 01:14 PM
Date formats in Word tonywex Microsoft Word Help 3 July 14th 05 02:24 PM
what are the correct date formats to use in word chezzan New Users 7 April 7th 05 04:31 AM


All times are GMT +1. The time now is 01:50 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"