Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formatting decimal places in a Word table | Tables | |||
Round numbers to 2 decimal places when using Word Mail Merge | Mailmerge | |||
Too many decimal places | Mailmerge | |||
Mail merge prints out incorrect no. of decimal places from Excel . | Mailmerge | |||
Maximum number of pages in a word document | Formatting Long Documents |