Question about "IF(AND" Statement

rwmill9716

Active Member
Joined
May 20, 2006
Messages
495
Office Version
  1. 2013
Platform
  1. Windows
Cell E58: =IF(AND(SUM(INDIRECT("C"&ROW(C58)-5):C58)=5, SUM(INDIRECT("E"&ROW(E57)-4):E57)=0),1,0)

Cell E57: =IF(AND(SUM(INDIRECT("C"&ROW(C57)-5):C57)=5, SUM(INDIRECT("E"&ROW(E56)-4):E56)=0),1,0)

Column E contains formula like the above. This particular one is found in Cell E58. My question: Why is the "1" found in cell E58 and not in cell E57?

<b>Excel 2003</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">48</td><td style="text-align: center;border-top: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">49</td><td style="text-align: center;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">50</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">51</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">11</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">52</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">53</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">54</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">55</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">56</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">57</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">58</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">1</td></tr><tr ><td style="color: #161120;text-align: center;">59</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">60</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">61</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">62</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">63</td><td style="text-align: center;border-bottom: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-bottom: 1px solid black;;">1</td><td style="text-align: center;border-left: 1px solid black;;">0</td></tr></tbody></table><p style="width:6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Runs Rules</p><br /><br />
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
For E57
This...
INDIRECT("C"&ROW(C57)-5):C57
...evaluates to range C52:C57 (six cells total)

Each cell in range C52:C57 has a 1 and the total is six and not five.

For E58
C58 is zero. So SUM(C53:C58) total is five.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top