Lookup formula

Johnboy28

Board Regular
Joined
Jun 22, 2013
Messages
198
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2010
Platform
  1. Windows
Hi - Looking for a formula that can lookup updated price list by matching Product Code. If no updated price is found then use previous sales price (19/09/2024) Thanks

Product Specification
Date17/09/202418/09/202419/09/202420/09/2024
Product CodeSales PriceSales PriceSales PriceSales Price
12143$11.40$11.00$11.00
12145$9.00$9.00$9.00
12251$9.20$9.20$9.20
12255$9.00$9.00$9.00
12256$9.15$9.15$9.15
14902$15.00$15.00$15.00
20094$3.00$3.00$3.00
20824$7.60$7.60$7.60
20995$8.60$8.60$8.60
21021$9.15$9.15$9.15
21685$7.00$7.00$7.00
22186$3.80$3.80$3.80
Updated Price List
Product CodeSales Price
12143$5.00
12145$0.00
12255$9.10
20094$3.00
20568$9.50
20580$9.35
20824$8.20
75202$7.80
20995$8.60
21021$9.10
90525$6.50
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
So, what are your expected results for that sample data and where would those results go?

Please consider using XL2BB for providing sample data and expected results.
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)
 
Upvote 0
So, what are your expected results for that sample data and where would those results go?

Please consider using XL2BB for providing sample data and expected results.
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)
Thanks for getting back to me. The results would go under date 20/09/2024. I have entered the first 2 results.

Product Specification
Date17/09/202418/09/202419/09/202420/09/2024
Product CodeSales PriceSales PriceSales PriceSales Price
12143$11.40$11.00$11.00$5.00
12145$9.00$9.00$9.00$9.00
12251$9.20$9.20$9.20Results here
12255$9.00$9.00$9.00Results here
12256$9.15$9.15$9.15Results here
14902$15.00$15.00$15.00Results here
20094$3.00$3.00$3.00Results here
20824$7.60$7.60$7.60Results here
20995$8.60$8.60$8.60Results here
21021$9.15$9.15$9.15Results here
21685$7.00$7.00$7.00Results here
22186$3.80$3.80$3.80Results here
Updated Price List
Product CodeSales Price
12143$5.00
12255$9.10
20094$3.00
20568$9.50
20580$9.35
20824$8.20
75202$7.80
20995$8.60
21021$9.10
90525$6.50
 
Upvote 0
Excel Formula:
=IFERROR(XLOOKUP(A3:A14,J2:J11,K2:K11),D3:D14)

Product specs (headers included) in A1:E14
Updated price list (headers included) in J1:K11
 
Upvote 0
In cell E3 (which corresponds to the Sales Price for 20/09/2024), enter the following formula:

=IFERROR(VLOOKUP(A3, $G$3:$H$13, 2, FALSE), D3)

Copy this formula down for all your products in Column E.
 
Upvote 0
Clear all results in that column first. It will generate a dynamic array so teh cells below the formula have to be empty
 
Upvote 0
In cell E3 (which corresponds to the Sales Price for 20/09/2024), enter the following formula:



Copy this formula down for all your products in Column E.
Perfect - That works great. Thank you
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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