Array Formula to extract values?

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
950
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I have two columns

Col A. Col B.
"A" item1
"B" item2
"D" item3
"A" item4
"E" item5
"C" item6
"A" item7
"B" item8
... and so on..

I am looking for a formula (possibly needs to be an array formula?) to extract all items from Col B. with "A" value in col A. to another sheet.

so in this example it will be:

item1
item4
item7

any ideas please?

many thanks,
Andrew
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try this:

=IFERROR(INDEX($B:$B,SMALL(IF($A$2:$A$10="A",ROW($A$2:$A$10)),ROWS($C$1:C1))),"")

Enter with Ctrl+Shift+Enter

Or:

=IFERROR(INDEX($B:$B,AGGREGATE(15,6,ROW($A$2:$A$10)/($A$2:$A$10="A"),ROWS($C$1:C1))),"")

Just Enter.
 
Upvote 0
How about
+Fluff.xlsm
A
1B
2Item 2
3Item 8
4 
5 
6 
7 
8
9
Sheet2
Cell Formulas
RangeFormula
A2:A7A2=IFERROR(INDEX(Sheet1!$B$2:$B$9,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$9)-ROW(Sheet1!$A$2)+1)/(Sheet1!$A$2:$A$9=$A$1),ROWS($A$2:$A2))),"")
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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