Formula Help

N

Nikki

=IF(ISERROR(V2/U2),"0.00"%,V2/U2)

In the above formula, where can I add the Round to round to 4 digits for the
result?

Thanks
nikki
 
J

Joe User

Nikki said:
=IF(ISERROR(V2/U2),"0.00"%,V2/U2)
In the above formula, where can I add the Round to round to
4 digits for the result?

First, the formula should be:

=IF(ISERROR(V2/U2), 0, V2/U2)

formatted as Percentage. Return the __number__ 0.00%, not the text "0.00%".

Second, it is unclear what you want rounded to 4 digits. My guess: you
want the __percentage__ rounded to 4 decimal places.

Two ways, depending on your intent:

1. Format the cell with Percentage with 4 decimal places. Note: that
changes the appearance, but not the actual value.

2. Explicitly round the expression __and__ change the cell format (#1).
That changes the actual value as well as the appearance.

The trick is: percentage units already represent 2 decimal places of a
decimal fraction. So you need to do:

=IF(ISERROR(V2/U2), 0, ROUND(V2/U2, 6))

Note the use of 6 instead of 4.

Finally, if you are only trying to avoid a divide-by-zero error, you could
write:

=IF(U2=0, 0, ROUND(V2/U2,6))
 

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