Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
Thanks a lot Roger! Much appreciated.
Roger Govier wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula? | Excel Worksheet Functions | |||
writing a formula for a colored value | New Users to Excel | |||
referencing named formula using INDIRECT function | Excel Worksheet Functions | |||
Simplify formula | Excel Worksheet Functions | |||
Match / Vlookup within an Array formula | Excel Discussion (Misc queries) |