LOOKUP 2nd to last and 3rd to last

skovatov

New Member
Joined
Mar 17, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello, I could use a little help please in determining the correct formula to use. See uploaded Sample Chart. I am trying to lookup the last price, the second to last price, and the third to last price for a widget in a list of widgets, and the list of widgets and prices will continue to be added to. If I add another Widget B, and enter the advertised price, I'd like the next three columns to auto populate with the last price for Widget B, the second to last price for Widget B, and the third to last price for Widget B. I hope I'm doing an okay job explaining the desired outcome in conjunction with the supplied sample chart. Thank you, in advance for your time and feedback, it's greatly appreciated.

thank you!
 

Attachments

  • Sample chart.gif
    Sample chart.gif
    15.2 KB · Views: 8

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Welcome to the MrExcel forum!

Try:

Book1 (version 1).xlsb
ABCDE
1Mfr Part Number Advertised Price Last Advertised Price 2nd to Last Advertised Price 3rd to Last Advertised Price
2Widget A$ 2.00 N/A N/A N/A
3Widget B$ 3.00 N/A N/A N/A
4Widget C$ 4.00 N/A N/A N/A
5Widget D$ 1.50 N/A N/A N/A
6Widget D$ 1.00$ 1.50 N/A N/A
7Widget B$ 2.00$ 3.00 N/A N/A
8Widget A$ 6.00$ 2.00 N/A N/A
9Widget C$ 3.00$ 4.00 N/A N/A
10Widget A$ 2.50$ 6.00$ 2.00 N/A
11Widget B$ 4.00$ 2.00$ 3.00 N/A
12Widget C$ 2.10$ 3.00$ 4.00 N/A
13Widget D$ 6.00$ 1.00$ 1.50 N/A
14Widget B$ 7.00$ 4.00$ 2.00$ 3.00
15Widget C$ 1.00$ 2.10$ 3.00$ 4.00
16Widget D$ 5.00$ 6.00$ 1.00$ 1.50
17Widget A$ 3.00$ 2.50$ 6.00$ 2.00
Sheet4
Cell Formulas
RangeFormula
C2:E17C2=IFERROR(INDEX($B:$B,AGGREGATE(14,6,ROW($A$1:$A1)/($A$1:$A1=$A2),COLUMNS($C2:C2))),"N/A")
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,603
Members
449,089
Latest member
Motoracer88

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