Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Rounding up on a merged field
Hi I have the decimal places down with {mergefield total \#,##0.00} But my
amount to the third decimal place is 2,348.115. How do I get the 5 to round up. I'm looking for 2348.12 it always rounds down at 5. And give me a total of 2348.11. thanks in advance. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Rounding up on a merged field
Word should produce 2348.12 without interference if you use a switch eg \#
",0.00" but if for some reason I cannot fathom it is not doing so then you could force the same effect with calculated fields eg {IF { Mergefield Total \# ".000" } = ".??5" "{ =({ Mergefield Total \# ",0.00" } + .01) \# ",0.00" }" "{Mergefield Total \# ",0.00" }" } would produce the result you require. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wmannod wrote: Hi I have the decimal places down with {mergefield total \#,##0.00} But my amount to the third decimal place is 2,348.115. How do I get the 5 to round up. I'm looking for 2348.12 it always rounds down at 5. And give me a total of 2348.11. thanks in advance. |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Rounding up on a merged field
Hi wmannod,
If your source data actually have more than three decimal places, the 2,348.115 that you see when rounding to three decimal places might really be 2,348.1149 or something such, which would round down to 2,348.11 when rounded to two decimal places. Cheers "wmannod" wrote in message news Hi I have the decimal places down with {mergefield total \#,##0.00} But my amount to the third decimal place is 2,348.115. How do I get the 5 to round up. I'm looking for 2348.12 it always rounds down at 5. And give me a total of 2348.11. thanks in advance. |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Rounding up on a merged field
You are correct. But I don't know why it brings in this number. The figure is
coming from an excel spreedsheet that is the total of two feilds that are two decimal places. One field is amount, the other is GST, it is a calculated field (=V2*0.07). When the merge is done it brings in the GST and Total columms in with 14 decimal places. Can I stop this from happening? Total field accually reads 2348.11499999999998 in the merge. "macropod" wrote: Hi wmannod, If your source data actually have more than three decimal places, the 2,348.115 that you see when rounding to three decimal places might really be 2,348.1149 or something such, which would round down to 2,348.11 when rounded to two decimal places. Cheers "wmannod" wrote in message news Hi I have the decimal places down with {mergefield total \#,##0.00} But my amount to the third decimal place is 2,348.115. How do I get the 5 to round up. I'm looking for 2348.12 it always rounds down at 5. And give me a total of 2348.11. thanks in advance. |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Rounding up on a merged field
Hi wmannod,
The 2348.11499999999998 is a by-product of how Excel does its rounding. You can work around this by embedding your mergefield inside a formula field, coded like: {={mergefield total \# 0.000} \# ,0.00} This will round your 2348.11499999999998 to 2,348.12. Cheers "wmannod" wrote in message ... You are correct. But I don't know why it brings in this number. The figure is coming from an excel spreedsheet that is the total of two feilds that are two decimal places. One field is amount, the other is GST, it is a calculated field (=V2*0.07). When the merge is done it brings in the GST and Total columms in with 14 decimal places. Can I stop this from happening? Total field accually reads 2348.11499999999998 in the merge. "macropod" wrote: Hi wmannod, If your source data actually have more than three decimal places, the 2,348.115 that you see when rounding to three decimal places might really be 2,348.1149 or something such, which would round down to 2,348.11 when rounded to two decimal places. Cheers "wmannod" wrote in message news Hi I have the decimal places down with {mergefield total \#,##0.00} But my amount to the third decimal place is 2,348.115. How do I get the 5 to round up. I'm looking for 2348.12 it always rounds down at 5. And give me a total of 2348.11. thanks in advance. |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Rounding up on a merged field
Thanks,
But everytime I try this I get a syntax error. I've tried in a fomula and also the toggle field code and just typing it in. I'm using XP and office 2003. Is there a book I can read that has examples of these codes? "macropod" wrote: Hi wmannod, The 2348.11499999999998 is a by-product of how Excel does its rounding. You can work around this by embedding your mergefield inside a formula field, coded like: {={mergefield total \# 0.000} \# ,0.00} This will round your 2348.11499999999998 to 2,348.12. Cheers "wmannod" wrote in message ... You are correct. But I don't know why it brings in this number. The figure is coming from an excel spreedsheet that is the total of two feilds that are two decimal places. One field is amount, the other is GST, it is a calculated field (=V2*0.07). When the merge is done it brings in the GST and Total columms in with 14 decimal places. Can I stop this from happening? Total field accually reads 2348.11499999999998 in the merge. "macropod" wrote: Hi wmannod, If your source data actually have more than three decimal places, the 2,348.115 that you see when rounding to three decimal places might really be 2,348.1149 or something such, which would round down to 2,348.11 when rounded to two decimal places. Cheers "wmannod" wrote in message news Hi I have the decimal places down with {mergefield total \#,##0.00} But my amount to the third decimal place is 2,348.115. How do I get the 5 to round up. I'm looking for 2348.12 it always rounds down at 5. And give me a total of 2348.11. thanks in advance. |
#7
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Rounding up on a merged field
Are you using Ctrl+F9 to insert each pair of field delimiters { }?
It certainly does work in Word 2003 running under Windows XP To see more than you wanted to know about field codes, see macropod's Word Field Maths 'tutorial', at: http://www.wopr.com/cgi-bin/w3t/show...?Number=365442 -- 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 "wmannod" wrote in message ... Thanks, But everytime I try this I get a syntax error. I've tried in a fomula and also the toggle field code and just typing it in. I'm using XP and office 2003. Is there a book I can read that has examples of these codes? "macropod" wrote: Hi wmannod, The 2348.11499999999998 is a by-product of how Excel does its rounding. You can work around this by embedding your mergefield inside a formula field, coded like: {={mergefield total \# 0.000} \# ,0.00} This will round your 2348.11499999999998 to 2,348.12. Cheers "wmannod" wrote in message ... You are correct. But I don't know why it brings in this number. The figure is coming from an excel spreedsheet that is the total of two feilds that are two decimal places. One field is amount, the other is GST, it is a calculated field (=V2*0.07). When the merge is done it brings in the GST and Total columms in with 14 decimal places. Can I stop this from happening? Total field accually reads 2348.11499999999998 in the merge. "macropod" wrote: Hi wmannod, If your source data actually have more than three decimal places, the 2,348.115 that you see when rounding to three decimal places might really be 2,348.1149 or something such, which would round down to 2,348.11 when rounded to two decimal places. Cheers "wmannod" wrote in message news Hi I have the decimal places down with {mergefield total \#,##0.00} But my amount to the third decimal place is 2,348.115. How do I get the 5 to round up. I'm looking for 2348.12 it always rounds down at 5. And give me a total of 2348.11. thanks in advance. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Incompleted merged field. | Mailmerge | |||
Merged field is truncated | Mailmerge | |||
Text cut off in merged document when very long field data | Mailmerge | |||
Make merged field bold if merged field is > 3 | Mailmerge | |||
Make merged field bold if merged field > 3 | Mailmerge |