BikeJockey
New Member
- Joined
- Feb 17, 2016
- Messages
- 1
Hi
I have a worksheet that lists all the state changes for an issue along with the date of the state change:
IssueID, OldState, NewState, DateOfChange
111, 1, 3, 05/05/2015
111, 3, 4, 06/05/2015
111, 4, 3, 07/05/2015
112, 1, 3, 08/05/2015
112, 3, 5, 09/05/2015
I want to change this so that it is more like this:
IssueID, DateOfState1, DateOfState2, DateOfState3 .....
111
112
An Issue can go through a single state more than once in which case the latest state counts. Not all issues go through all states
I have sorted the worksheet by IssueID (ASC) and DateOfChange (NEWEST to OLDEST)
Then I have used the following formula in the DateOfState1 column (as an array formula):
=INDEX('Issue'!G:L,MATCH(1,('Issue'!A:A=A2)*('Issue'!C:C=1),0),4)
Being an array formula I selected the column, entered the formula and pressed shift+ctr+enter.
But this only matches to A2 on all rows and what I want is to match on the relevant row so I tried using INDIRECT like so:
=INDEX('Issue'!G:L,MATCH(1,('Issue'!A:A=INDIRECT("A" & ROW()))*('Issue'!C:C=1),0),4)
And then add the formula as an array formula on the column but failed with a #VALUE error.
So I tried this:
=INDEX('Issue'!G:L,MATCH(1,('Issue'!A:A=A2:A6)*('Issue'!C:C=1),0),4)
But that also failed.
Any help in how I do this would be appreciated.
Thanks
I have a worksheet that lists all the state changes for an issue along with the date of the state change:
IssueID, OldState, NewState, DateOfChange
111, 1, 3, 05/05/2015
111, 3, 4, 06/05/2015
111, 4, 3, 07/05/2015
112, 1, 3, 08/05/2015
112, 3, 5, 09/05/2015
I want to change this so that it is more like this:
IssueID, DateOfState1, DateOfState2, DateOfState3 .....
111
112
An Issue can go through a single state more than once in which case the latest state counts. Not all issues go through all states
I have sorted the worksheet by IssueID (ASC) and DateOfChange (NEWEST to OLDEST)
Then I have used the following formula in the DateOfState1 column (as an array formula):
=INDEX('Issue'!G:L,MATCH(1,('Issue'!A:A=A2)*('Issue'!C:C=1),0),4)
Being an array formula I selected the column, entered the formula and pressed shift+ctr+enter.
But this only matches to A2 on all rows and what I want is to match on the relevant row so I tried using INDIRECT like so:
=INDEX('Issue'!G:L,MATCH(1,('Issue'!A:A=INDIRECT("A" & ROW()))*('Issue'!C:C=1),0),4)
And then add the formula as an array formula on the column but failed with a #VALUE error.
So I tried this:
=INDEX('Issue'!G:L,MATCH(1,('Issue'!A:A=A2:A6)*('Issue'!C:C=1),0),4)
But that also failed.
Any help in how I do this would be appreciated.
Thanks