Pull list of entries with a match in another column

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have the data in the following format:
Capture.PNG

What I need to do is to pull all numbers from column E (there are no duplicates there) whenever there's a "Randomized" tag in respective row, column G. I.e. I need to pull 197, 198, 199 (but not 200), then 201 etc. This is a dynamic table so filtering by "randomized" is not practical unfortunately. I'd much rather have these numbers on a separate tab - one number per cell, auto-refreshing whenever there's new source data.
Thanks for the advice!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
update... looks like solution is found for the first entry (cell A2 now contains "Randomized" as a fixed reference)
Excel Formula:
=INDEX(IWRS!E:E,SMALL(IF($A$2=IWRS!G:G,ROW(G:G),""),ROW()-ROW(B2)))
...but when pulling down, I'm getting the same number again and again.
 
Upvote 0
If there's no solution for Excel 2016, appreciate a hint for 365 version...
 
Upvote 0
For Excel 2016 try this in B2, copied down. Note that I have not used whole column references as that can lead to a significant calculation overhead which is generally not warranted. Just use a big enough row range that it will always cover any expected data.

Excel Formula:
=IFERROR(INDEX(IWRS!E$1:E$1000,AGGREGATE(15,6,(ROW(IWRS!E$1:E$1000)-ROW(IWRS!E$1)+1)/(IWRS!G$1:G$1000=A$2),ROWS(B$2:B2))),"")

If you did have Excel 365 it would be much simpler as you would only need this simple formula in B2 and not even need to copy it down.
Excel Formula:
=FILTER(IWRS!E1:E1000,IWRS!G1:G1000=A2,"")
 
Upvote 0
Solution
Thank you Peter_SSs!
The 2016 formula works perfectly! I was already thinking about posting the file on Teams and apply FILTER function there (as I don't have "offline" Office 365 yet).
Have a great day!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. ;)
 
Upvote 0

Forum statistics

Threads
1,214,553
Messages
6,120,182
Members
448,948
Latest member
spamiki

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