Finding Latest Value in List of Many Items

karse

New Member
Joined
Feb 23, 2018
Messages
1
Hi! I'm trying to find a way to do a vlookup/use a pivot table to find the last value in column B for each part number in column A (ie. 48200-091-02 would give me 0, LV429235 would be 0, etc). It's not always the max/min, so a pivot table isn't working.

4884625
LV4292350
48200-091-021000
48200-091-020
BBV59050-F400
LV429235100
LV429235200
LV4292350
LV42923650

<colgroup><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the MrExcel board!

Here are 2 option to consider, depending on how dynamic you need the results to be. In each case the '1000' values in my formulas need to be something at least as large as the last row of your data.

Option A (not dynamic)
1. In an empty column (I've used column D) put the formula shown into row 2 in that column, leaving the cell above blank.
2. Select the data (A1:B10 in my case) & on the Data ribbon tab choose 'Advanced' in the Sort & Filter section -> Copy to another location -> List range should already be populated with $A$1:$B$10 -> Criteria range: $D$1:$D$2 -> Copy to: F1 -> OK


Book1
ABCDEFG
1Part NoValuePart NoValue
24884625TRUE4884625
3LV429235048200-091-020
448200-091-021000BBV59050-F400
548200-091-020LV4292350
6BBV59050-F400LV42923650
7LV429235100
8LV429235200
9LV4292350
10LV42923650
11
Option A
Cell Formulas
RangeFormula
D2=COUNTIF(A2:A$1000,A2)=1



Option B (dynamic, but more formula overheads)
Each of these formulas copied down as far as you might need


Book1
ABCDE
1Part NoValuePart NoValue
248846254884625
3LV4292350LV4292350
448200-091-02100048200-091-020
548200-091-020BBV59050-F400
6BBV59050-F400LV42923650
7LV429235100
8LV429235200
9LV4292350
10LV42923650
11
Option B
Cell Formulas
RangeFormula
D2=IFERROR(INDEX($A$2:$A$1000,MATCH(0,INDEX(COUNTIF($D$1:D1,$A$2:$A$1000)+($A$2:$A$1000=""),),0)),"")
E2=IF(D2="","",LOOKUP(9.99E+307,B$2:B$1000/(A$2:A$1000=D2)))
 
Upvote 0
Like this:

=LOOKUP(9.99999999999999E+307,1/($A$2:$A$10=E2),$B$2:$B$10)

where E2 houses a value of interest like 48200-091-02.
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

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