Using INDEX and SMALL(IF) to return values horizontally

mxgarrison

New Member
Joined
Jul 5, 2023
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Hi. I have 2 sets of data in one excel spreadsheet tab. One is unique PN's (aka Column G). Other is duplicate PN's with unique locations (aka Columns A1-C10). Below is my formula I'm working on.

=IFERROR(INDEX($A$1:$C$10,SMALL(IF($G$1=$A$1:$A$10,ROW($A$1:$A$10)-ROW($A$1)+1), COLUMN($I$1)),3),"???")

All I'm getting back in column I1 is ???. Below is my data:

ABCDEFG
123456-0001Widget 1A01A789123-0015
123456-0001Widget 1A01D456789-0002
123456-0001Widget 1A02C123456-0001
123456-0001Widget 1A05D
123456-0001Widget 1B04D
123456-0001Widget 1B06A
456789-0002Widget 2B05C
456789-0002Widget 2B14A
789123-0015Widget 3A05D
789123-0015Widget 3A04D

I've been working on this forever and I'm just stuck. Please help.

Thanks
-Mark
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I did forget to mention I want my data like this:

789123-0015 A05D A04D
456789-0002 B05C B14A
123456-0001 A01A A01D A02C A05D B04D B06A
 
Upvote 0
Try:
Book2
ABCDEFGHIJKLM
1123456-0001Widget 1A01A789123-0015A05DA04D    
2123456-0001Widget 1A01D456789-0002B05CB14A    
3123456-0001Widget 1A02C123456-0001A01AA01DA02CA05DB04DB06A
4123456-0001Widget 1A05D
5123456-0001Widget 1B04D
6123456-0001Widget 1B06A
7456789-0002Widget 2B05C
8456789-0002Widget 2B14A
9789123-0015Widget 3A05D
10789123-0015Widget 3A04D
Sheet1
Cell Formulas
RangeFormula
H1:M3H1=IFERROR(INDEX($C$1:$C$10,AGGREGATE(15,6,(ROW($A$1:$A$10)-ROW($A$1)+1)/($A$1:$A$10=$G1),COLUMNS($H$1:H1))),"")
 
Upvote 0
That works! Thanks! But now I need to add in another 2 columns into the array. A qty in column D and ID in E. So each location in column C will have a qty in D and an ID in E. How do I add that in?

1688647731426.png

1688647764756.png
 
Upvote 0

Forum statistics

Threads
1,215,139
Messages
6,123,262
Members
449,093
Latest member
Vincent Khandagale

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