mail merge w/ excel and conditions

A

Ahmayzin1

Using word format for report; using excel ss for data. Have several
divisions which are not standard. Merge of data to semi-standard is not
problem....getting the numbers formatted is....want to put conditional format
in word.

If number from merge field is smaller than 1 format as percent (no
decimals), if not format as a whole number with commas

sounds simple...but I have spent four full days playing with ifs and {}
help!!!

thanks
 
P

Peter Jamieson

Can you clarify what you mean here:
smaller than 1 format as percent (no decimals)

?

e.g.
a. can the number be negative? What then?
b. If the number is .675 do you want 67% or 68% (i.e. standard rounding)
c. if the number is (say) 1000.77 do you want rounding (1,001) or the
integer part only (1,000)?

Taking a few guesses, something along the following lines should do the
trick, where all the {} are the special field braces you can insert
using ctrl-F9:

{ IF { ={ MERGEFIELD mynumber }-1 } >= 0 "{ =int({ MERGEFIELD mynumber
}) \#,0 }" "{ { MERGEFIELD }*100 \#0% }" }


Peter Jamieson

http://tips.pjmsn.me.uk
 
M

macropod

Hi Ahmayzin1,

Try:
{IF{MERGEFIELD Data}< 1 {={MERGEFIELD Data}*100 \# "0%"} {MERGEFIELD Data \# ",0"}}
where 'Data' is your merfield name.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top