Return list in a range, all values, based on condition

Kanuck

New Member
Joined
Jun 8, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello,

I am trying to return the values in column B, based on a condition in column A. Below is the formula I have which is working, but returns values only once if for values that are duplicated. i.e. if 'apple' is the result on the sheet 5 times, the list will only return it once. I was to see it 5 times. I need it to return all values which meet the criteria when searching the range.
Should I be using a different function?

{=index('$B$3:$B$100, MATCH(0,IF($A$3:$A$100<>"Yes",countif($A$3:$A3,$B$3:$B$100),""),0))}

Thank you in advance.
Kanuck
 
Hi Kanuck,

I'm not sure I'm following but you could probably used the new FILTER function, whereas my old Excel 2016 would use SMALL or AGGREGATE to retrive all occurrences from one column based on another column.

Kanuck.xlsx
ABCD
1Find all=Apple
2FruitTypeList
3OrangeNavelGranny Smith
4AppleGranny SmithBlenheim
5BananaCavendishFuji
6AppleBlenheim 
7AppleFuji 
8BananaPlantain 
9 
Sheet1
Cell Formulas
RangeFormula
D3:D9D3=IFERROR(INDEX($B$3:$B$9999,AGGREGATE(15,6,ROW($B$3:$B$9999)-ROW($B$2)/($A$3:$A$9999=$D$1),ROW()-ROW($D$2))),"")
 
Upvote 0
Solution
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Return list in a range, all values based on condition
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
As Toadstool mentioned, you can also use the FILTER function.
+Fluff 1.xlsm
ABCD
1Find all=Apple
2FruitTypeList
3OrangeNavelGranny Smith
4AppleGranny SmithBlenheim
5BananaCavendishFuji
6AppleBlenheim
7AppleFuji
8BananaPlantain
9
Lists
Cell Formulas
RangeFormula
D3:D5D3=FILTER(B3:B8,A3:A8=D1)
Dynamic array formulas.
 
Upvote 0

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