J
Justin Kerstetter
I'm sending price and quantity values to a mail merge doc,
and would like to calculate a "price per each" field. The
Price/Qty formula works great when a quantity exists, but
the problem is that there are cases when the quantity (and
the price, for that matter) are equal to zero.
I've wrestled with the "if" statement shown below, but I'm
still getting the 'divide by zero' error when the merge is
run. I'm thinking the division formula is being evaluated
regardless of its place in the "if" statement. Any
suggestions on how to get the field to do the division if
the quantity is not zero, but to get it to suppress or
print "0.0000" when the quantity is zero?
Here's the statement I've been working with:
{ IF Qty2 <> 0 {=Price2/Qty2 \# "#,###,##0.0000"} 0.0000 }
Much thanks in advance,
Justin
and would like to calculate a "price per each" field. The
Price/Qty formula works great when a quantity exists, but
the problem is that there are cases when the quantity (and
the price, for that matter) are equal to zero.
I've wrestled with the "if" statement shown below, but I'm
still getting the 'divide by zero' error when the merge is
run. I'm thinking the division formula is being evaluated
regardless of its place in the "if" statement. Any
suggestions on how to get the field to do the division if
the quantity is not zero, but to get it to suppress or
print "0.0000" when the quantity is zero?
Here's the statement I've been working with:
{ IF Qty2 <> 0 {=Price2/Qty2 \# "#,###,##0.0000"} 0.0000 }
Much thanks in advance,
Justin