Tidyup of IF formula

G

Guest

Hello folks.

I have the following formula that does do the the required job.
Is it possible for it to be 'tidied up', possibly with a lookup formula.

=IF(Apr!$C5="","X",IF(Apr!$C5="Holiday","Hol.",IF(Apr!$C5="Sick","Sick",IF(Apr!$C5="Worked","Work",IF(Apr!$C5="Day
Off","D / O",IF(Apr!$C5="Wrk & 1/2 Hol","½ Hol.",""))))))

Your help is and always has been very much appreciated.
Thanking you in anticipation.
 
P

Peo Sjoblom

If you create a table like this

Holiday Hol
Sick Sick
Worked Work
Day Off D / O
Wrk $ 1/2 Hol" 1/2 Hol


put it somewhere off view maybe Y1:Z5 then you can use

=IF(Apr!$C5="","X",VLOOKUP(Apr!C5,Y1:Z5,2,0))

hard coded it would look like

=IF(Apr!$C5="","X",VLOOKUP(Apr!C5,{"Holiday","Hol";"Sick","Sick";"Worked","Work";"Day
Off","D / O";"Wrk $ 1/2 Hol""","1/2 Hol"},2,0))
 

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