Reputation: 147
I would like to find the right formula to see how the category of accounts changed over time. There are 2 tables: List - contains account id, start date, end date, current category, and date columns Status Change - contains account id, transfer date, changed from, changed to. I need to find the right formula for date columns in the List tab. It should work in this way:
Here is the example table - https://docs.google.com/spreadsheets/d/1yw3t7oiuRUcWkzCuEB-20sMcnwOnt3BTmS7jjEdphIQ/edit#gid=1693652082
List tab contains the result that should be returned by formula.
Upvotes: 0
Views: 85
Reputation: 247
Hey to achieve your intended goal from "List" tab, it will be an extremely complicated set of if else conditions:
=if($D2="",if(E$1<$C2,"", ifna(if(index('Status Change'!$G$2:$G,match($A2,'Status Change'!$F$2:$F,0))="","Status 1", if(E$1<index('Status Change'!$G$2:$G,match($A2,'Status Change'!$F$2:$F,0)),"Status 1",if(index('Status Change'!$H$2:$H,match($A2,'Status Change'!$F$2:$F,0))="","Status 2",if(E$1<index('Status Change'!$H$2:$H,match($A2,'Status Change'!$F$2:$F,0)),"Status 2","Status 3")))),"Status 1")),if(E$1<$D2,if(E$1<$C2,"", ifna(if(index('Status Change'!$G$2:$G,match($A2,'Status Change'!$F$2:$F,0))="","Status 1", if(E$1<index('Status Change'!$G$2:$G,match($A2,'Status Change'!$F$2:$F,0)),"Status 1",if(index('Status Change'!$H$2:$H,match($A2,'Status Change'!$F$2:$F,0))="","Status 2",if(E$1<index('Status Change'!$H$2:$H,match($A2,'Status Change'!$F$2:$F,0)),"Status 2","Status 3")))),"Status 1")),""))
I have appended the formula into the "List Test" tab. Try to read up on what I have wrote and let me know if you have trouble understanding it. Thx
Upvotes: 1