Look up value and Return value of most recent date

YS4U

New Member
Joined
Mar 10, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows

SKU
STORE AA DATESTORE BB DATE
710111.872/21/211.6910/7/21
711151.073/22/22NAX
FPF3NAX1.783/22/22
6508766.349/21/216.0810/8/21
503EZNAX9.003/22/22
720143.602/22/22NAX
98823NAX5.052/21/22

PROBLEM: look up SKU and return most recent price paid.
Hello! I'm trying to get a formula that will look up SKU on SHEET1 and grab the most recent price paid. I'm using 365 and of course am loving the XLOOKUP, but maybe this is more of an index/match thing I figured it out for an in row if(or statement used in another formula that had to deal with the Xs and NAs but I can't seem to figure out how to find the SKU then do a conditional statement to return the date. I have 365. I tried taking a sample using the XL2BB, but my spreadsheet wasn't having it and after 15 minutes of it thinking, I abandoned so hopefully the table here will be enough info. I'm sure it's simple for the pros :)
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I don't know why my table headers and columns are not aligned; I created a table and this is what it did. For simplicity just call the data row headers A, B, C, D, E and ignore SKU, STORE A, etc. I can't figure out how to add something to the beginning find the SKU then apply this formula in the row of the found SKU from another sheet without the use of a helper column.

=IF(E2="NA",B2,IF(OR(C2="NA",C2<E2), D2,B2))
 
Upvote 0
I'm trying to make it easy to understand, but those aren't my headers and the formula that I'm working with to try to apply to finding SKU (which is in column H for one store and I for the other) isn't transferring correctly. I wish the XL2BB thing worked :(

So on SHEET2 a SKU is entered that can be found in H or I; Store A(H) has more products than Store B(I). So the formula would
1. Find the SKU entered on SHEET2 in SHEET1 Columns H and I
2. From the row where the SKU is found, spit out the price last paid

H = Store A SKU
I = Store B SKU
J = Store A Price
K = Store A Date Purchased
M = Store B Price
N = Store B Date Purchased
NO = Not available at that store/No data/never purchased from that store
'--- = No Data

on SHEET1 I have a helper column now that works =IF(N2="---",J2,IF(OR(K2="---",K2<N2), M2,J2)) I'd like to put one formula on Sheet2 that can handle this but I can't figure out the part where it finds the SKU in H and/or I
Let me try adding a table with more accurate headers

HIJKMN
71011330CV1.872/21/211.6910/21/21
71115142361.033/22/222.40---
NOFPF3NO---1.783/22/22
6508768830CV6.349/21/216.0810/8/21
NO503EZNO---9.003/22/22
72014NO3.602/22/22NO---
NO98823NO---5.052/21/22
 
Upvote 0
Hi,

A suggestion, how about just Nest a couple of VLOOKUP, something like:

IFERROR(VLOOKUP(1st range using H),VLOOKUP(2nd range using I))
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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