View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Tidyup of IF formula

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))



--

Regards,

Peo Sjoblom


"Big Rick" wrote in message
...
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",I F(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.
--
Big Rick