Create Dynamic List - Based On Criteria

Wobzy

Board Regular
Joined
Mar 25, 2017
Messages
54
Hey guys,

ABC
1Client01aInactiveClient01b
2Client01bActiveClient02c
3Client02a
InactiveClient03a
4Client02bInactive
5Client02cActive
6Client03aActive

<tbody>
</tbody>

Im working on a database wherein multiple instances of an entry in A:A need to exist for the sake of historical data.

I want C:C to automatically list only the most current version of the entry, dictated by corresponding B:B value Active.

I'm trying and failing to produce the result using index and match.

Help is appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Put this formula on C1:
Code:
=IFERROR(INDEX(A:A, MATCH("Active",B:B, FALSE)), "")

Put this on C2:
Code:
=IFERROR(INDEX(A:A, MATCH(C1,A:A, 0)+MATCH("Active", INDIRECT(ADDRESS(MATCH(C1,A:A, 0)+1, 2)  & ":" & "$B$" & ROWS(B:B)),0)), "")

Drag the formula on C2 downwards.
 
Upvote 0
Put this formula on C1:
Code:
=IFERROR(INDEX(A:A, MATCH("Active",B:B, FALSE)), "")

Put this on C2:
Code:
=IFERROR(INDEX(A:A, MATCH(C1,A:A, 0)+MATCH("Active", INDIRECT(ADDRESS(MATCH(C1,A:A, 0)+1, 2)  & ":" & "$B$" & ROWS(B:B)),0)), "")

Drag the formula on C2 downwards.

Hey thanks for that.

Yeah C2 is where im having the issue.

In my sheet;
A:A = D:D
B:B = E:E
C:C = K:K

Swapping out the references produced no result for the second formula.

So i created a dummy table using exactly the info i gave in the example.
It worked perfectly.
I inserted columns where required, instantly broke the references.
The only reference that didn't auto update was "$B$"
Updated it manually but to no effect.

Sorry im a bit out of my depth.
 
Upvote 0
Have you corrected the parts where says C1 to the proper address?
 
Upvote 0
Row\Col
A​
B​
C​
1​
Client01aInactive
3​
2​
Client01bActiveClient01b
3​
Client02aInactiveClient02c
4​
Client02bInactiveClient03a
5​
Client02cActive
6​
Client03aActive

In C1 just enter:

=COUNTIFS(A1:A6,"?*",B1:B6,"active")

In C2 control+shift+enter, not just enter, and copy down:

=IF(ROWS($C$3:C3)>$C$1,"",INDEX($A$1:$A$6,SMALL(IF($B$1:$B$6="active",IF(1-($A$1:$A$6=""),ROW($A$1:$A$6)-ROW($A$1)+1)),ROWS($C$3:C3))))
 
Upvote 0
Have you corrected the parts where says C1 to the proper address?

In C1 just enter:

=COUNTIFS(A1:A6,"?*",B1:B6,"active")

In C2 control+shift+enter, not just enter, and copy down:

=IF(ROWS($C$3:C3)>$C$1,"",INDEX($A$1:$A$6,SMALL(IF($B$1:$B$6="active",IF(1-($A$1:$A$6=""),ROW($A$1:$A$6)-ROW($A$1)+1)),ROWS($C$3:C3))))


Hey Guys,

Thanks for the responses.

I did update all references, no result.
For both Iggy and Aladins examples.

I can usually logic my way out of formula i don't fully understand.
But I've been at it for ages I'm just not getting it.

So here's my actual table;

ABCDEFGHIJK
1Client01aINACTIVEClient01b
2Client01bACTIVEClient02c
3Client02aINACTIVEClient03a
4Client02bINACTIVEClient04b
5Client02cACTIVEClient05a
6Client03aACTIVE
7Client04aINACTIVE
8Client04bACTIVE
9Client05aINACTIVE

<tbody>
</tbody>

D & E (formerly A & B) are dynamic and will be updated manually.
K (formerly C) is dynamic and will need to automatically update active values from D.
I cant say how long the list will get.
If referencing the whole column is not ideal, i don't imagine i'll be going past 200.

Thanks again so much guys.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,370
Members
449,080
Latest member
Armadillos

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