I think that would be for VBA? I'm not sure how I would do that for a formula in a cell.Indent the code?
Let me have a try....There are usually better ways to do things than deeply-nested IFs, but as you would expect, it kinda depends on what you're trying to do.
is this really a nested IF? or is it an IF with 5 different options?
Nested IF...
IF(male, If(brunette, IF(older than 20, IF(speaks English, IF(less than 6ft tall, do this, do that)
5 different options...
=if(A1=1, "a", if(a1=2, "b", if(a1=3,"c", if(a1=4,"d", if(a1=5, "e",""))))
For the 1st 1, *maybe???* use AND()
for the 2nd, use a table and vlookup()
I think something like this may work:If it's a contract worker, check if they worked on xmas day, if they did then pay double time, if they didn't then check if they worked on a bank holiday, if they did then pay time and a half, if they didn't then check what hours they worked between midnight and 6am and pay those hours at time and a half, if none of these conditions are true then just pay worked hours at time.