Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
wmannod
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
wmannod
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
wmannod
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incompleted merged field. Gerald tyree Mailmerge 1 July 12th 05 05:22 AM
Merged field is truncated Tim Mailmerge 1 May 25th 05 07:51 AM
Text cut off in merged document when very long field data charlene leblanc Mailmerge 0 January 17th 05 06:03 PM
Make merged field bold if merged field is > 3 Vick Mailmerge 3 December 15th 04 02:32 PM
Make merged field bold if merged field > 3 Vick Mailmerge 1 December 13th 04 04:26 PM


All times are GMT +1. The time now is 05:31 PM.

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"