Vlookup while ignoring values returned in previous rows

HarryP96

New Member
Joined
Oct 20, 2020
Messages
11
Office Version
  1. 2010
Platform
  1. MacOS
Hi,

I have a set of data with a non-unique numerical ID. However, the column "Name" can be considered unique. Please see below. The cell reference of "Order ID" is B1 and the bottom right cell is G15.

Order IDNamePoule NumberVictoriesPropIndicator
845.3333333​
James
1​
5​
0.83​
12​
497​
Peter
1​
3​
0.50​
-3​
328.3333333​
Charlie
1​
2​
0.33​
-5​
328.3333333​
Alex
1​
2​
0.33​
-5​
675.6666667​
Harry
1​
4​
0.67​
9​
-17​
Benjamin
1​
0​
0.00​
-17​
1015​
David
1​
6​
1.00​
15​
670.6666667​
Tom
2​
4​
0.67​
4​
-9​
Emily
2​
0​
0.00​
-9​
502​
Emma
2​
3​
0.50​
2​
664.6666667​
Amy
2​
4​
0.67​
-2​
675.6666667​
Liam
2​
4​
0.67​
9​
325.3333333​
George
2​
2​
0.33​
-8​
502​
Anthony
2​
3​
0.50​
2​



I need to filter this table to sort by the size of the ID column. I need to do this using an active formula. I do not have access to the filter() function as I am using an old version of excel.


I have ordered the Order ID column using the formula large(). I now need to pull through each name associated with each ID into this table. For example, in the table above both Liam and Harry have an ID of 675.666. If I used a standard vlookup in the table below, Harry would be returned for both instances. I need both Harry and Liam to show in subsequent cells. i.e. conduct a vlookup but ignore any names already returned in the rows above? I'm a bit lost on how to do this, so any help would be greatly appreciated.

For further context, the cell reference of the cell containing "Helper" is I1, and the bottom right cell is K15.

HelperOrdered IDOrdered Name
1​
1015​
James
2​
845.3333333​
3​
675.6666667​
4​
675.6666667​
5​
670.6666667​
6​
664.6666667​
7​
502​
8​
502​
9​
497​
10​
328.3333333​
11​
328.3333333​
12​
325.3333333​
13​
-9​
 

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.
This should work with your version of Excel.
Book1
BCDEFGHIJK
1Order IDNamePoule NumberVictoriesPropIndicatorOrder IDName
2845.3333333James150.831211015David
3497Peter130.5-32845.3333James
4328.3333333Charlie120.33-53675.6667Harry
5328.3333333Alex120.33-53675.6667Liam
6675.6666667Harry140.6795670.6667Tom
7-17Benjamin100-176664.6667Amy
81015David161157502Emma
9670.6666667Tom240.6747502Anthony
10-9Emily200-99497Peter
11502Emma230.5210328.3333Charlie
12664.6666667Amy240.67-210328.3333Alex
13675.6666667Liam240.67912325.3333George
14325.3333333George220.33-813-9Emily
15502Anthony230.5214-17Benjamin
16   
Sheet1
Cell Formulas
RangeFormula
I2:I16I2=IFERROR(RANK(J2,$J$2:$J$20),"")
J2:J16J2=IFERROR(LARGE($B$2:$B$20,ROWS(J$2:J2)),"")
K2:K16K2=IF(J2="","",INDEX(C:C,AGGREGATE(15,6,ROW($B$2:$B$20)/($B$2:$B$20=J2),COUNTIF(J$2:J2,J2))))
 
Upvote 0
Try:
Drag formula down as needed.

Book3
ABCDEFGHIJK
1Order IDNamePoule NumberVictoriesPropIndicatorHelperOrdered IDOrdered Name
2845.3333333James150.831211015David
3497Peter130.50-32845.3333333James
4328.3333333Charlie120.33-53675.6666667Harry
5328.3333333Alex120.33-54675.6666667Liam
6675.6666667Harry140.6795670.6666667Tom
7-17Benjamin100.00-176664.6666667Amy
81015David161.00157502Emma
9670.6666667Tom240.6748502Anthony
10-9Emily200.00-99497Peter
11502Emma230.50210328.3333333Charlie
12664.6666667Amy240.67-211328.3333333Alex
13675.6666667Liam240.67912325.3333333George
14325.3333333George220.33-813-9Emily
15502Anthony230.502
Sheet1
Cell Formulas
RangeFormula
K2:K14K2=INDEX($C$2:$C$15,AGGREGATE(15,6,(ROW($C$2:$C$15)-ROW($C$2)+1)/($B$2:$B$15=J2),COUNTIF($J$2:J2,J2)))
 
Upvote 0
Solution
Try:
Drag formula down as needed.

Book3
ABCDEFGHIJK
1Order IDNamePoule NumberVictoriesPropIndicatorHelperOrdered IDOrdered Name
2845.3333333James150.831211015David
3497Peter130.50-32845.3333333James
4328.3333333Charlie120.33-53675.6666667Harry
5328.3333333Alex120.33-54675.6666667Liam
6675.6666667Harry140.6795670.6666667Tom
7-17Benjamin100.00-176664.6666667Amy
81015David161.00157502Emma
9670.6666667Tom240.6748502Anthony
10-9Emily200.00-99497Peter
11502Emma230.50210328.3333333Charlie
12664.6666667Amy240.67-211328.3333333Alex
13675.6666667Liam240.67912325.3333333George
14325.3333333George220.33-813-9Emily
15502Anthony230.502
Sheet1
Cell Formulas
RangeFormula
K2:K14K2=INDEX($C$2:$C$15,AGGREGATE(15,6,(ROW($C$2:$C$15)-ROW($C$2)+1)/($B$2:$B$15=J2),COUNTIF($J$2:J2,J2)))
This works perfectly - thank you so much!
 
Upvote 0
You're welcome. Glad we could help. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,089
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