Full Version: IF
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
tpitman
What is the maximumum number of IF statements you can use in one cell?

i.e.

=IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B5=0,1,IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B11="OFF",1,IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B11="AL",1,IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B11="Lieu Time",1,IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B11="BH",1,IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B11="2Hrs",4,IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B11="Xmas Day",1,IF('\\Lancelot\Live Exhibits\Botanical\Timesheet Check\Tom Pitman\[Timesheet.xls]wtd'!B10>0,2,3))))))))

I want to add one more IF, but I receive a formula error.
KingMartin
7

Martin
tpitman
Strange, The formula above has 8 and works, I need to add another IF statement.
KingMartin
Hello again,

there is a limit of 7 nested IFs:

http://support.microsoft.com/kb/214154/en-us

I didn't examine your formula thoroughly, may be thzat not all the 8 iFs are nested...

You may need some workaround formula to overcome this problem.

Martin
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.