Help with Identifying Most Recent Date In Another Sheet Based on Specific Criteria

ktran2024

New Member
Joined
Jan 29, 2024
Messages
2
Office Version
  1. 2021
Platform
  1. MacOS
Hello There,



Hoping I can get some help on this issue. I have some data in two different sheets and want to do a lookup to pull in the invoice date from sheet 2 into sheet 1 (with certain criteria applied).

I want to pull in the invoice date from sheet 2 into sheet 1. However, there are multiple invoice dats for the same PO Name so I want to pull in the most recent invoice date that is less than the current order date.

I tried to do something using =MAX(INDEX((F1=A2:A11)*B2:B11,)), but not sure how to do it using a lookup to a different sheet. Is this possible? Any insight you can share with be much appreciated. Thank you!

Sheet 1:

PO NameOrder DateAmount
JJ Order1/15/24$100
EJ Order2/15/24$200

Sheet 2:

PO NameInvoice DateAmount
JJ Order1/1/24$100
EJ Order2/1/24$200
JJ Order12/1/23$250
EJ Order1/20/24$400
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try this

You can get the latest date of each PO number that you are going to check

Excel Formula:
=INDEX($G$3:$G$6,MATCH(A3,$F$3:$F$6,1))

1706577932692.png
 
Upvote 0
Solution
try this:

Excel Formula:
=MAX(FILTER(Sheet2!B10:B13,(A4=Sheet2!A10:A13)*(B4>Sheet2!B10:B13),""))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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