Formula

G

gdf1903

Hi all,

I am using the following formula in a Excel 2003.

=IF((F12="Maternity leave"),C12/5*G12,IF((F12="Jury
Service"),C12/5*G12,IF((F12="Paternity
Leave"),C12/5*G12,IF((F12="Family Leave"),C12/5*G12,IF((F12="Special
Leave"),C12/5*G12,IF((F12="Unauthorised
Absence"),C12/5*G12,IF((F12="Compassionate
Leave"),C12/5*G12,IF((F12="Annual leave"),C12/5*G12))))))))

I'm trying to state that if F12 is one of the values listed then
display the result of the calculation C12/5*G12.

This is working.

Where would I add something to this to display text if F12 does not
equal any of the values listed? At the moment it displays FALSE, I just
want it blank.

Is there another way to get the desired result other than an IF
statement? It's ery long and in the future may be even longer. Would a
CASE statement work?

Thanks.

Gary.
 
R

Roger Govier

Hi Gary

Try
=IF(OR(F12="Maternity leave",F12="Jury Service", .....,F12="Annual
Leave"),C12/5*G12,"")

(sorry, I got bored with the typing, you can fill in the rest<bg>, or
shorten the entries to ML, JS etc.)

Regards

Roger Govier
 
G

gdf1903

Thanks a lot Roger! Much appreciated.


Roger said:
Hi Gary

Try
=IF(OR(F12="Maternity leave",F12="Jury Service", .....,F12="Annual
Leave"),C12/5*G12,"")

(sorry, I got bored with the typing, you can fill in the rest<bg>, or
shorten the entries to ML, JS etc.)

Regards

Roger Govier
 

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