Two Column match, with 1 result return, displaying horizontally.

JohnnyIsNerdy

New Member
Joined
Oct 18, 2021
Messages
8
Office Version
  1. 365
  2. 2019
  3. 2013
  4. 2010
  5. 2007
Platform
  1. Windows
Hello,

I've tried small, large, aggregate.. I just can't get it right.

My goal is to have a list on a separate sheet, but I tried on the same sheet as the data to see if it can be done first.

Look for ID within the list and match, check if that ID matches a criteria in another column (other than ID), and return all results horizontally sorted large to small.

1. criteria ID and owner (has 3 or 4 , so maybe an or )
2. return a value in another column
3. display horizontally in order of large to small.

I used aggregate(14,6,...) / (criteria...)

Any help out there would be great. I've tried to follow an example on here but I can't get multiple results using array format.

I'll post an example snippet of the data for more clarification.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
For clarity, please post a sample of what you have and then what you want. Use XL2BB to do this as we cannot manipulate data in a picture.
 
Upvote 0
Welcome to MrExcel Message Board.
Try this:
Book1
ABCDEFGHIJKLMNOP
1IDValuesIDNumbersIDNumbers
2A00145A00562A005625350    
3A0024653
4A0034750
5A00448 
6A00149 
7A00550 
8A00351 
9A00252
10A00553
11A00254
12A00455
13A00456
14A00157
15A00258
16A00359
17A00460
18A00161
19A00562
20
Sheet1
Cell Formulas
RangeFormula
I2:O2I2=IFERROR(AGGREGATE(14,6,$B$2:$B$19/($A$2:$A$19=$E$2),COLUMNS($H$1:H1)),"")
F2:F8F2=IFERROR(AGGREGATE(14,6,$B$2:$B$19/($A$2:$A$19=$E$2),ROWS($E$1:E1)),"")
 
Last edited:
Upvote 0
Maybe one of these.
+Fluff 1.xlsm
ABCDEFGHIJKLM
1IDValuesIDNumbers
2A00145YA002545246   
3A00246Y545246
4A00347Y
5A00448Y
6A00149Y
7A00550Y
8A00351Y
9A00252Y
10A00553N
11A00254Y
12A00455N
13A00456N
14A00157Y
15A00258N
16A00359N
17A00460Y
18A00161N
19A00562Y
Lists
Cell Formulas
RangeFormula
G2:L2H2=IFERROR(AGGREGATE(14,6,$B$2:$B$19/($A$2:$A$19=$F2)/($C$2:$C$19="Y"),COLUMNS($G$1:H1)),"")
G3:I3G3=TRANSPOSE(SORT(FILTER(B2:B19,(A2:A19=F2)*(C2:C19="Y")),,-1))
Dynamic array formulas.
 
Upvote 0
Welcome to MrExcel Message Board.
Try this:
Book1
ABCDEFGHIJKLMNOP
1IDValuesIDNumbersIDNumbers
2A00145A00562A005625350    
3A0024653
4A0034750
5A00448 
6A00149 
7A00550 
8A00351 
9A00252
10A00553
11A00254
12A00455
13A00456
14A00157
15A00258
16A00359
17A00460
18A00161
19A00562
20
Sheet1
Cell Formulas
RangeFormula
I2:O2I2=IFERROR(AGGREGATE(14,6,$B$2:$B$19/($A$2:$A$19=$E$2),COLUMNS($H$1:H1)),"")
F2:F8F2=IFERROR(AGGREGATE(14,6,$B$2:$B$19/($A$2:$A$19=$E$2),ROWS($E$1:E1)),"")
What does that last array mean? it looks like it's naming the header for the ID.
This is what I put, is this wrong? I'm not getting multiple results.

=IFERROR(AGGREGATE(14,6,$CO$4:$CO$28/(($CE$4:$CE$28=$CX4)*($CL$4:$CL$28=$CO$1)),COLUMNS($CX$3:CX3)),"")

Any idea what I'm doing wrong here?


1634659916320.png
 
Upvote 0
So I'm trying to get the id to match and the owner to be specific, if it checks out, i return all the heights.
 
Upvote 0
You need to drag that formula to the right. With 365 you could also use the formula I showed in G3 which will automatically spill to the right.
 
Upvote 0
You need to drag that formula to the right. With 365 you could also use the formula I showed in G3 which will automatically spill to the right.
SWEET!! Woo hoo! For "or", do I just do a + instead of *?
 
Upvote 0
Which formula are you referring to?
 
Upvote 0
This is what I ended up using.

I should be able to get the lowest, but I think I'm going to use SMALL this time, since I found out aggregate can't use labels.

Also, this is an off topic, I was referencing a worksheet that will be deleted and added, but same name. I was getting REF cause it was no longer there, so I resorted to to using indirect with the name of the worksheet. Is there a better way to do it? That's the only way I found, but didn't look to hard since it worked lol. It's so crazy how powerful excel is and with vba too.

If I had only resorted to registering and posting here sooner LOL :D

=IFERROR((AGGREGATE(14,6,$BP$4:$BP$2003/(($BF$4:$BF$2003=$CW4)*(($BM$4:$BM$2003='Static Names'!$Q$3)+($BM$4:$BM$2003='Static Names'!$Q$4)+($BM$4:$BM$2003='Static Names'!$Q$5))),COLUMNS($CW3:CW3))),"")


1634854357560.png
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,107
Members
453,021
Latest member
Justyna P

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