Cascade IF's

arogers

New Member
Joined
Aug 28, 2014
Messages
6
I am trying to use cascading if's to make my spreadsheet more automated. The idea is to automatically update a days pending cell as a project moves through different stages.

Here is my code:

=IF(M17="",DAYS360(L17,NOW()),IF(L17="",DAYS360(J17,NOW()),IF(J17="",DAYS360(H17,NOW()),IF(H17="",DAYS360(F17,NOW()),IF(F17="",DAYS360(E17,NOW()),IF(E17="",DAYS360(D17,NOW()),IF(D17="",D17,DAYS360(D17,NOW()))))))))

D column represents oldest date value and M represents most recent date value.
 
Column numbers begin with 1 for Col_A and increment across columns to the right.
Col_A = 1
Col_B = 2
etc.

So, in the formula I posted, this section: MATCH(COLUMN(D17:M17),{4,5,6,8,10,12,13},0)
Checks if the column number for each cell in D17:M17 is on our list of columns we're interested in checking.
ColNum 4 = Col_D
ColNum 5 = Col_E
ColNum 6 = Col_F
ColNum 8 = Col_H
ColNum 10 = Col_J
ColNum 12 = Col_L
ColNum 13 = Col_M

Does that help?
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,216,138
Messages
6,129,099
Members
449,486
Latest member
malcolmlyle

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