Help to understand "IF" code

N

nascarjc

Hello all,
This is the first time in here. I have a question about a line of cod
which has today() and weekday() in it. Can someone explain this for m
so that I may understand it better? The person who did it can'
explain it so hopefully you can. Thanks in advance.

=IF(E8="HO","HO",IF(E5=12,"X",IF((TODAY()+1)>E6,IF((WEEKDAY(E6,2)>5),"",IF(E8="OT","OT",IF(E9="FH",8,IF(E5=11,8,9)))),"")))

J
 
D

Dav

=IF(E8="HO","HO",IF(E5=12,"X",IF((TODAY()+1)>E6,I
((WEEKDAY(E6,2)>5),"",IF(E8="OT","OT",IF(E9="FH",
,IF(E5=11,8,9)))),"")))

Today() is a function which returns today's date

Weekday is a function which returns the day in a week from 1 to7 , th
2 parameter just means that monday is 1 through to sunday is 7

So if E8 equals HO return HO
Else if E5 equals 12 return X
Else if tomorrow (today +1) is greater than E6 and E6 is a Frida
return blank
Else if tomorrow (today +1) is greater than E6 and E8 equals OT retur
OT
Else if Else if tomorrow (today +1) is greater than E6 and E9 equals F
return 8
Else if tomorrow (today +1) is greater than E6 and E5 equals 11 retur
8
Else if tomorrow (today +1) is greater than E6 Return 9
Else return blank

it is probably worth populating the cells E5 E6 E8 E9 and checking i
the above logic holds. Nested if statements are not easy to read i
excel especially if you did not write them in the first place!

Hope this helps

Dav

Return blan
 
N

nascarjc

Dav,
Thanks for your help in understanding the formula. The way you put it
it makes more sense to me. I now want to modify this formula and no
that I understand it more I should be able to do it.

James:
 
N

nascarjc

Dav,
Thanks for your help in understanding the formula. The way you put it
it makes more sense to me. I now want to modify this formula and no
that I understand it more I should be able to do it.

James:
 

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

Similar Threads

Double Metal Jacketed Gasket 0
Formula 6
Tricky Formula 2
Tricky Formulas 14
An easier way? 8
Ongoing Issue - I have tried to clarify so that you understand 7
Using the VLOOKUP feature #2! 3
margin calc 2

Top