How many conditions can I put into an if statement?
I wanted to put in twelve conditions, but it will not let me go past
seven. Is this the maximum number?
=IF($A1=quot;januaryquot;,SUM($B$1:$B$3),IF($A1=quot;Februaryquot; ,SUM($B$2:$B$4),IF($A1=quot;marchquot;,SUM($B$3:$B$5),IF($ A1=quot;aprilquot;,SUM($B$4:$B$6),IF($A1=quot;mayquot;,SUM($B$5:$B $7),IF($A1=quot;Junequot;,SUM($B$6:$B$8),IF($A1=quot;julyquot;,SUM ($B$7:$B$9),0)))))))
Thank you very much
Lynne--
Lynneth
------------------------------------------------------------------------
Lynneth's Profile: www.excelforum.com/member.php...oamp;userid=26102
View this thread: www.excelforum.com/showthread...hreadid=538892You are limited to 8, 7 nested, functions. Try this instead
=SUM(INDEX(B:B,MONTH(DATEVALUE(quot;1-quot;amp;A1amp;quot;-2000quot;))):INDEX(B:B,MONTH(DATEVALUE(
quot;1-quot;amp;A1amp;quot;-2000quot;)) 2))
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
quot;Lynnethquot; gt; wrote in
message ...
gt;
gt; How many conditions can I put into an if statement?
gt;
gt; I wanted to put in twelve conditions, but it will not let me go past
gt; seven. Is this the maximum number?
gt;
gt;
=IF($A1=quot;januaryquot;,SUM($B$1:$B$3),IF($A1=quot;Februaryquot; ,SUM($B$2:$B$4),IF($A1=quot;ma
rchquot;,SUM($B$3:$B$5),IF($A1=quot;aprilquot;,SUM($B$4:$B$6), IF($A1=quot;mayquot;,SUM($B$5:$B$7
),IF($A1=quot;Junequot;,SUM($B$6:$B$8),IF($A1=quot;julyquot;,SUM($ B$7:$B$9),0)))))))
gt;
gt; Thank you very much
gt; Lynne
gt;
gt;
gt; --
gt; Lynneth
gt; ------------------------------------------------------------------------
gt; Lynneth's Profile:
www.excelforum.com/member.php...oamp;userid=26102
gt; View this thread: www.excelforum.com/showthread...hreadid=538892
gt;
- Dec 18 Thu 2008 20:47
How many 'if's'?
close
全站熱搜
留言列表
發表留言
留言列表

