Reply
 
Thread Tools Display Modes
  #1   Report Post  
Ray_Johnson
 
Posts: n/a
Default Set number of decimal places in bookmark

Hello. I have a Word 2003 template that uses bookmarks from text fields.
The text fields are set up as Number type with a Number format of #,##0.00.

Later in the document I have some { IF } statements. For example,

{ IF { HowPaid } = weekly { = WeeklyCS * 1 } }
{ IF { HowPaid } = bi-weekly { = WeeklyCS * 2 } }
{ IF { HowPaid } = semi-monthly { = WeeklyCS * 2.15 } }
{ IF { HowPaid } = monthly { = WeeklyCS * 4.3 } }

(Note that the calculation for monthly is 4.3, not 4.333... as it would be
if multiplied out correctly, but I'm just using the calculations I was given.)

I want to have these { IF } results to have two decimal places. I don't see
anything in the \* formatting for setting number of decimal places. If
there's more than two, it seems to cut down to two, but if there's only one
decimal place (or none), it leaves it as it is. I need it to be two decimal
places, no matter what.

Any ideas?

-Ray
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

See "Formatting Word fields with switches" on fellow MVP Graham Mayor's
website at

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


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Ray_Johnson" wrote in message
...
Hello. I have a Word 2003 template that uses bookmarks from text fields.
The text fields are set up as Number type with a Number format of
#,##0.00.

Later in the document I have some { IF } statements. For example,

{ IF { HowPaid } = weekly { = WeeklyCS * 1 } }
{ IF { HowPaid } = bi-weekly { = WeeklyCS * 2 } }
{ IF { HowPaid } = semi-monthly { = WeeklyCS * 2.15 } }
{ IF { HowPaid } = monthly { = WeeklyCS * 4.3 } }

(Note that the calculation for monthly is 4.3, not 4.333... as it would be
if multiplied out correctly, but I'm just using the calculations I was
given.)

I want to have these { IF } results to have two decimal places. I don't
see
anything in the \* formatting for setting number of decimal places. If
there's more than two, it seems to cut down to two, but if there's only
one
decimal place (or none), it leaves it as it is. I need it to be two
decimal
places, no matter what.

Any ideas?

-Ray



  #3   Report Post  
Ray_Johnson
 
Posts: n/a
Default

Very helpful. Thank you, Doug, for pointing me in the right direction.
Thank you, Graham, for a very well-written description.

"Doug Robbins" wrote:

See "Formatting Word fields with switches" on fellow MVP Graham Mayor's
website at

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


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Ray_Johnson" wrote in message
...
Hello. I have a Word 2003 template that uses bookmarks from text fields.
The text fields are set up as Number type with a Number format of
#,##0.00.

Later in the document I have some { IF } statements. For example,

{ IF { HowPaid } = weekly { = WeeklyCS * 1 } }
{ IF { HowPaid } = bi-weekly { = WeeklyCS * 2 } }
{ IF { HowPaid } = semi-monthly { = WeeklyCS * 2.15 } }
{ IF { HowPaid } = monthly { = WeeklyCS * 4.3 } }

(Note that the calculation for monthly is 4.3, not 4.333... as it would be
if multiplied out correctly, but I'm just using the calculations I was
given.)

I want to have these { IF } results to have two decimal places. I don't
see
anything in the \* formatting for setting number of decimal places. If
there's more than two, it seems to cut down to two, but if there's only
one
decimal place (or none), it leaves it as it is. I need it to be two
decimal
places, no matter what.

Any ideas?

-Ray




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
Formatting decimal places in a Word table Terri Creagh Tables 2 May 10th 23 02:53 AM
Round numbers to 2 decimal places when using Word Mail Merge ALJ Mailmerge 3 April 30th 23 02:49 PM
Too many decimal places Chris Knigge Mailmerge 1 April 13th 05 05:19 AM
Mail merge prints out incorrect no. of decimal places from Excel . UDDWF Mailmerge 1 February 7th 05 11:22 PM
Maximum number of pages in a word document Travis75 Formatting Long Documents 5 January 27th 05 05:03 AM


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