Conditional number field formatting

M

Marion Zapolin

I need to apply different formatting to a field depending
on the value. If >.99, I need to format as \#,##%, and if
less as \#,##.###%. I'm trying to use the if statement to
decide which format to use, but I can't get the syntax
right. Can you tell me what is wrong with this statement:
{if {mergefield number} < .99, {={mergefield number}
\#,##%} {={mergefield number}\#,##.##%}

Thanks
 
G

Greg Maxey

Marion,

First I think you want a greater than sign ">"
Next put the values in quotes e.g., ".99" " "{={MergeField} \# #,##%"
Next you must identify the switch e.g., \# #,##% not \#,##%'

HTH

--
\\\\///////////
( @ @ )
----oo00---(_)---00oo----
Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
 
P

Peter Jamieson

In addition to Greg's comments, strictly speaking you do not need the { = }
fields, e.g.

{ IF { MERGEFIELD number } > 0.99
"{ MERGEFIELD number \#,##% }"
"{ MERGEFIELD number \#,##.##% }" }
 

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