Return latest Date according to specified Month

thanksamillion101

New Member
Joined
Jul 8, 2020
Messages
41
Office Version
  1. 2010
Hello all! I truly appreciate this forum and the help I have received!! I do spend alot of time in trying to figure out myself before approaching this site. It is when there has just been too much time taken out of my day that I finally post a thread for help. So, again thank you all for your time and knowledge, it is greatly appreciated! Another formula needed and thank you in advance!

I need a formula that will return the latest date according to indicated Month ("U2") abbreviation. There will be many repeated dates and not sure if that is the problem, I have other conditional formatting as well.

IFERROR(LOOKUP(4,1/(A2:A8=M2)/(C2:C8=O2)/(G2:G8=P2)/(TEXT(D2:D8,"mm")=TEXT("*"&U2&"*","mm")),D2:D8),"Err")

ABCDEFGHMNOPU
1​
NameZoneDriverExam DateClassIDCityStateNamePRDriverCityMonthLatest Date
2​
J, Smith
4​
AA125
1-Jun-19​
C125FFEDenverCOJ, Smith551AA125DenverJunErr
3​
K, Terry
6​
AA457
5-Jun-21​
K457DDEDallasTXK, Terry3284AA457Dallas
4​
L, Johnson
9​
BB813
3-Jan-20​
E813EGALos AngelesCAL, Johnson6009Los Angeles
5​
P, Wayne
6​
CC777
11-Apr-21​
E777KKAFt. WorthTXP, Wayne771CC777Ft. Worth
6​
R, Zapata
5​
DD888
18-Jun-19​
H888LWNOKCOKR, Zapata7722DD888OKC
7​
J, Smith
4​
AA125
12-Jun-21​
C125FFEDenverCO
8​
J, Smith
4​
AA125
15-Apr-22​
C125FFEDenverCO
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
If the dates for each name increase down the column, then you could try this adaptation of your formula.
Excel Formula:
=IFERROR(LOOKUP(4,1/(A2:A8=M2)/(C2:C8=O2)/(G2:G8=P2)/(TEXT(D2:D8,"mmm")=U2),D2:D8),"Err")

If the dates could be mixed up, or in any case, you could also try this.
Excel Formula:
=IFERROR(AGGREGATE(14,6,D2:D8/(A2:A8=M2)/(C2:C8=O2)/(G2:G8=P2)/(TEXT(D2:D8,"mmm")=U2),1),"Err")
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,640
Members
448,974
Latest member
DumbFinanceBro

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