VLOOKUP to find latest date based on criteria in another column

craigg3

Board Regular
Joined
Dec 23, 2002
Messages
163
Office Version
  1. 365
Platform
  1. Windows
I am trying to get the latest date from column B if the text in column A =Hamburger. I would like to return the result in cell C1. For the below example, it should return the date of 6/25/2022, im just not sure how to make that happen. Thanks.

Example:
FOOD (Column A)DATE (Column B)
Hamburger4/5/2022
Pizza5/23/2022
Sandwich7/5/2022
Hamburger6/25/2022
Fries3/28/2022
Hamburger5/1/2022
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Sorry, currently using 2013, windows platform. Thanks.
 
Upvote 0
EDIT

sorry - missed the reply

=MAX(IF(($A$1:$A$20=D2),$B$1:$B$20))

not sure what version of excel you have

MAXIFS()

Book2
ABCDE
1FOOD (Column A)DATE (Column B)
2Hamburger5/4/22hamburger6/25/22
3Pizza5/23/22
4Sandwich5/7/22
5Hamburger6/25/22
6Fries3/28/22
7Hamburger1/5/22
Sheet2
Cell Formulas
RangeFormula
E2E2=MAXIFS(B2:B7,A2:A7,D2)


2013
Book2
ABCDEFG
1FOOD (Column A)DATE (Column B)2013
2Hamburger5/4/22hamburger6/25/226/25/22
3Pizza5/23/22
4Sandwich5/7/22
5Hamburger6/25/22
6Fries3/28/22
7Hamburger1/5/22
Sheet2
Cell Formulas
RangeFormula
E2E2=MAXIFS(B2:B7,A2:A7,D2)
G2G2=MAX(IF(($A$1:$A$20=D2),$B$1:$B$20))
 
Upvote 0
Thanks for that, how about
Excel Formula:
=MAX(IF(A2:A100="Hamburger",B2:B100))
This will need to be confirmed with Ctrl Shift Enter.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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