|
|
I am working with MS Office 2003 and trying to round a merge field to currency rounded to the nearest $1K. I've got the decimal rounding handled.
Thanks in advance for any input.
|
|
You should be able to find out how to do this in fellow MVP, Macropod's Word Field Maths 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?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
"workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com...
[Quoted Text] >I am working with MS Office 2003 and trying to round a merge field to > currency rounded to the nearest $1K. I've got the decimal rounding > handled. > > Thanks in advance for any input.
|
|
I think this one needs Macropod's further attention. In the meantime
{ IF{ =MOD({Mergefield Fieldname },1000) } < 500 "{ ={ =INT({ ={ =ROUND ({ Mergefield Fieldname},0) }/1000 }) } * 1000 \# ",$0" }" "{ ={ =INT({ ={ =ROUND ({ Mergefield Fieldname},0) }/1000 }) } * 1000 +1000 \# ",$0" }"}
is not very elegant but it appears to work :)
-- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Doug Robbins - Word MVP wrote:
[Quoted Text] > You should be able to find out how to do this in fellow MVP, > Macropod's Word Field Maths 'tutorial', at: > > http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=365442> > > "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in > message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >> I am working with MS Office 2003 and trying to round a merge field to >> currency rounded to the nearest $1K. I've got the decimal rounding >> handled. >> >> Thanks in advance for any input.
|
|
For positive amounts,
{ =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" }
?
(All the {} have to be the field code braces you can insert using ctrl-F9, not the ordinary keyboard characters)
Peter Jamieson "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com...
[Quoted Text] >I am working with MS Office 2003 and trying to round a merge field to > currency rounded to the nearest $1K. I've got the decimal rounding > handled. > > Thanks in advance for any input.
|
|
That's certainly better, but not as much fun ;)
-- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Peter Jamieson wrote:
[Quoted Text] > For positive amounts, > > { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } > > ? > > (All the {} have to be the field code braces you can insert using > ctrl-F9, not the ordinary keyboard characters) > > Peter Jamieson > "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in > message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >> I am working with MS Office 2003 and trying to round a merge field to >> currency rounded to the nearest $1K. I've got the decimal rounding >> handled. >> >> Thanks in advance for any input.
|
|
I get some amusement from the fact that an organisation that's dealing in $ amounts large enough that they want to round them to thousands of dollars can't work out how to do it. But not a lot :-)
Peter Jamieson
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message news:eHYYkMWjHHA.4624[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text] > That's certainly better, but not as much fun ;) > > -- > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > > Peter Jamieson wrote: >> For positive amounts, >> >> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >> >> ? >> >> (All the {} have to be the field code braces you can insert using >> ctrl-F9, not the ordinary keyboard characters) >> >> Peter Jamieson >> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>> I am working with MS Office 2003 and trying to round a merge field to >>> currency rounded to the nearest $1K. I've got the decimal rounding >>> handled. >>> >>> Thanks in advance for any input. > >
|
|
It's probably someone else's money ;)
-- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Peter Jamieson wrote:
[Quoted Text] > I get some amusement from the fact that an organisation that's > dealing in $ amounts large enough that they want to round them to > thousands of dollars can't work out how to do it. But not a lot :-) > > Peter Jamieson > > "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message > news:eHYYkMWjHHA.4624[ at ]TK2MSFTNGP04.phx.gbl... >> That's certainly better, but not as much fun ;) >> >> -- >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >> Graham Mayor - Word MVP >> >> My web site www.gmayor.com >> Word MVP web site http://word.mvps.org>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >> >> Peter Jamieson wrote: >>> For positive amounts, >>> >>> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >>> >>> ? >>> >>> (All the {} have to be the field code braces you can insert using >>> ctrl-F9, not the ordinary keyboard characters) >>> >>> Peter Jamieson >>> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >>> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>>> I am working with MS Office 2003 and trying to round a merge field >>>> to currency rounded to the nearest $1K. I've got the decimal >>>> rounding handled. >>>> >>>> Thanks in advance for any input.
|
|
It usually is :-)
Peter Jamieson
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message news:uRIEyMXjHHA.2272[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text] > It's probably someone else's money ;) > > -- > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > > Peter Jamieson wrote: >> I get some amusement from the fact that an organisation that's >> dealing in $ amounts large enough that they want to round them to >> thousands of dollars can't work out how to do it. But not a lot :-) >> >> Peter Jamieson >> >> "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message >> news:eHYYkMWjHHA.4624[ at ]TK2MSFTNGP04.phx.gbl... >>> That's certainly better, but not as much fun ;) >>> >>> -- >>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >>> Graham Mayor - Word MVP >>> >>> My web site www.gmayor.com >>> Word MVP web site http://word.mvps.org>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >>> >>> Peter Jamieson wrote: >>>> For positive amounts, >>>> >>>> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >>>> >>>> ? >>>> >>>> (All the {} have to be the field code braces you can insert using >>>> ctrl-F9, not the ordinary keyboard characters) >>>> >>>> Peter Jamieson >>>> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >>>> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>>>> I am working with MS Office 2003 and trying to round a merge field >>>>> to currency rounded to the nearest $1K. I've got the decimal >>>>> rounding handled. >>>>> >>>>> Thanks in advance for any input. > >
|
|
Hi all,
Perhaps the following would suit the OP better: {=ROUND({MERGEFIELD myamount},-3) \# "$,0"}
Cheers -- macropod [MVP - Microsoft Word] -------------------------
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message news:%23onw77VjHHA.4704[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text] > For positive amounts, > > { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } > > ? > > (All the {} have to be the field code braces you can insert using ctrl-F9, > not the ordinary keyboard characters) > > Peter Jamieson > "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in message > news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>I am working with MS Office 2003 and trying to round a merge field to >> currency rounded to the nearest $1K. I've got the decimal rounding >> handled. >> >> Thanks in advance for any input. > >
|
|
I knew you'd have a plan ;)
-- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
macropod wrote:
[Quoted Text] > Hi all, > > Perhaps the following would suit the OP better: > {=ROUND({MERGEFIELD myamount},-3) \# "$,0"} > > Cheers > > "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message > news:%23onw77VjHHA.4704[ at ]TK2MSFTNGP06.phx.gbl... >> For positive amounts, >> >> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >> >> ? >> >> (All the {} have to be the field code braces you can insert using >> ctrl-F9, not the ordinary keyboard characters) >> >> Peter Jamieson >> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>> I am working with MS Office 2003 and trying to round a merge field >>> to currency rounded to the nearest $1K. I've got the decimal >>> rounding handled. >>> >>> Thanks in advance for any input.
|
|
WOW!
Thanks to all for the prompt responses, with editorial... levity makes the world a better place!
BTW, Yes it is someone else’s money-surety for land development.
You all have my sincere respect and admiration.
Cheers!
"Graham Mayor" wrote:
[Quoted Text] > I knew you'd have a plan ;) > > -- > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > > macropod wrote: > > Hi all, > > > > Perhaps the following would suit the OP better: > > {=ROUND({MERGEFIELD myamount},-3) \# "$,0"} > > > > Cheers > > > > "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message > > news:%23onw77VjHHA.4704[ at ]TK2MSFTNGP06.phx.gbl... > >> For positive amounts, > >> > >> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } > >> > >> ? > >> > >> (All the {} have to be the field code braces you can insert using > >> ctrl-F9, not the ordinary keyboard characters) > >> > >> Peter Jamieson > >> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in > >> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... > >>> I am working with MS Office 2003 and trying to round a merge field > >>> to currency rounded to the nearest $1K. I've got the decimal > >>> rounding handled. > >>> > >>> Thanks in advance for any input. > > >
|
|
World domination!!!
-- macropod [MVP - Microsoft Word] -------------------------
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message news:%23jBdZMljHHA.4552[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text] >I knew you'd have a plan ;) > > -- > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > > macropod wrote: >> Hi all, >> >> Perhaps the following would suit the OP better: >> {=ROUND({MERGEFIELD myamount},-3) \# "$,0"} >> >> Cheers >> >> "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message >> news:%23onw77VjHHA.4704[ at ]TK2MSFTNGP06.phx.gbl... >>> For positive amounts, >>> >>> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >>> >>> ? >>> >>> (All the {} have to be the field code braces you can insert using >>> ctrl-F9, not the ordinary keyboard characters) >>> >>> Peter Jamieson >>> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >>> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>>> I am working with MS Office 2003 and trying to round a merge field >>>> to currency rounded to the nearest $1K. I've got the decimal >>>> rounding handled. >>>> >>>> Thanks in advance for any input. > >
|
|
For a moment I thought you said "Word domination" :-)
Peter Jamieson
"macropod" <invalid[ at ]invalid.invalid> wrote in message news:%239eEA2pjHHA.4848[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text] > World domination!!! > > -- > macropod > [MVP - Microsoft Word] > ------------------------- > > "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message > news:%23jBdZMljHHA.4552[ at ]TK2MSFTNGP04.phx.gbl... >>I knew you'd have a plan ;) >> >> -- >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >> Graham Mayor - Word MVP >> >> My web site www.gmayor.com >> Word MVP web site http://word.mvps.org>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >> >> macropod wrote: >>> Hi all, >>> >>> Perhaps the following would suit the OP better: >>> {=ROUND({MERGEFIELD myamount},-3) \# "$,0"} >>> >>> Cheers >>> >>> "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message >>> news:%23onw77VjHHA.4704[ at ]TK2MSFTNGP06.phx.gbl... >>>> For positive amounts, >>>> >>>> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >>>> >>>> ? >>>> >>>> (All the {} have to be the field code braces you can insert using >>>> ctrl-F9, not the ordinary keyboard characters) >>>> >>>> Peter Jamieson >>>> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >>>> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>>>> I am working with MS Office 2003 and trying to round a merge field >>>>> to currency rounded to the nearest $1K. I've got the decimal >>>>> rounding handled. >>>>> >>>>> Thanks in advance for any input. >>
|
|
There's a difference?
-- macropod [MVP - Microsoft Word] -------------------------
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message news:uwZ%23m9pjHHA.4800[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text] > For a moment I thought you said "Word domination" :-) > > Peter Jamieson > > "macropod" <invalid[ at ]invalid.invalid> wrote in message > news:%239eEA2pjHHA.4848[ at ]TK2MSFTNGP05.phx.gbl... >> World domination!!! >> >> -- >> macropod >> [MVP - Microsoft Word] >> ------------------------- >> >> "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message >> news:%23jBdZMljHHA.4552[ at ]TK2MSFTNGP04.phx.gbl... >>>I knew you'd have a plan ;) >>> >>> -- >>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >>> Graham Mayor - Word MVP >>> >>> My web site www.gmayor.com >>> Word MVP web site http://word.mvps.org>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >>> >>> macropod wrote: >>>> Hi all, >>>> >>>> Perhaps the following would suit the OP better: >>>> {=ROUND({MERGEFIELD myamount},-3) \# "$,0"} >>>> >>>> Cheers >>>> >>>> "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message >>>> news:%23onw77VjHHA.4704[ at ]TK2MSFTNGP06.phx.gbl... >>>>> For positive amounts, >>>>> >>>>> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >>>>> >>>>> ? >>>>> >>>>> (All the {} have to be the field code braces you can insert using >>>>> ctrl-F9, not the ordinary keyboard characters) >>>>> >>>>> Peter Jamieson >>>>> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >>>>> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>>>>> I am working with MS Office 2003 and trying to round a merge field >>>>>> to currency rounded to the nearest $1K. I've got the decimal >>>>>> rounding handled. >>>>>> >>>>>> Thanks in advance for any input. >>> >
|
|
I'd say
"an 'ell of a difference"
except then I'd have to kill myself...
Peter Jamieson "macropod" <invalid[ at ]invalid.invalid> wrote in message news:eal9pEqjHHA.5084[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] > There's a difference? > > -- > macropod > [MVP - Microsoft Word] > ------------------------- > > "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message > news:uwZ%23m9pjHHA.4800[ at ]TK2MSFTNGP02.phx.gbl... >> For a moment I thought you said "Word domination" :-) >> >> Peter Jamieson >> >> "macropod" <invalid[ at ]invalid.invalid> wrote in message >> news:%239eEA2pjHHA.4848[ at ]TK2MSFTNGP05.phx.gbl... >>> World domination!!! >>> >>> -- >>> macropod >>> [MVP - Microsoft Word] >>> ------------------------- >>> >>> "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message >>> news:%23jBdZMljHHA.4552[ at ]TK2MSFTNGP04.phx.gbl... >>>>I knew you'd have a plan ;) >>>> >>>> -- >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >>>> Graham Mayor - Word MVP >>>> >>>> My web site www.gmayor.com >>>> Word MVP web site http://word.mvps.org>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<> >>>> >>>> macropod wrote: >>>>> Hi all, >>>>> >>>>> Perhaps the following would suit the OP better: >>>>> {=ROUND({MERGEFIELD myamount},-3) \# "$,0"} >>>>> >>>>> Cheers >>>>> >>>>> "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in message >>>>> news:%23onw77VjHHA.4704[ at ]TK2MSFTNGP06.phx.gbl... >>>>>> For positive amounts, >>>>>> >>>>>> { =round({ MERGEFIELD myamount } / 1000,0) \#",$0K" } >>>>>> >>>>>> ? >>>>>> >>>>>> (All the {} have to be the field code braces you can insert using >>>>>> ctrl-F9, not the ordinary keyboard characters) >>>>>> >>>>>> Peter Jamieson >>>>>> "workliveplay" <workliveplay[ at ]discussions.microsoft.com> wrote in >>>>>> message news:9EC2581B-4FB7-496D-9AE8-CFB827C550F1[ at ]microsoft.com... >>>>>>> I am working with MS Office 2003 and trying to round a merge field >>>>>>> to currency rounded to the nearest $1K. I've got the decimal >>>>>>> rounding handled. >>>>>>> >>>>>>> Thanks in advance for any input. >>>> >>
|
|
|