Thread: Formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default Formula

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


wrote:
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.