vlookup max date

KAYE04

New Member
Joined
Mar 14, 2019
Messages
21
Office Version
  1. 2016
Platform
  1. Windows
hi i am having a trouble to figure out how to include the max function. my data sets are like this


1705632137784.png


for my summary I will identify per month who is the hired employee. I want my summary like this

1705632149411.png


For january it is not angelo because he is hired january 5 it should be mark because he is hired jan 31 the latest date
The header should be per month not specific date because I have lots of data BUD-002 upto BUD-600

i hope some one can help me
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

Is this what you are after?
24 01 19.xlsm
ABCDEFGH
1control #NameDateControl #JanuaryFebruaryMarch
2BUD-001Name 15/01/2024BUD-001Name 2Name 3Name 4
3BUD-001Name 231/01/2024BUD-002 Name 6Name 7
4BUD-001Name 325/02/2024
5BUD-001Name 415/03/2024
6BUD-002Name 515/02/2024
7BUD-002Name 618/02/2024
8BUD-002Name 716/03/2024
Latest hire
Cell Formulas
RangeFormula
F2:H3F2=IFERROR(INDEX($B:$B,AGGREGATE(14,6,ROW($C$2:$C$8)/(($A$2:$A$8=$E2)*(TEXT($C$2:$C$8,"mmmm")=F$1)),1)),"")
 
Upvote 0
I came up with this way, not sure if it is as comprehensive as @Peter_SSs 's version.
It requires you to have a date formatted as long month name for the column headers.

Book1
ABCD
1control #NameDate Hired
2A1BUD-001Angelo2024-01-05
3A2BUD-001Mark2024-01-31
4A3BUD-001Carlo2024-02-25
5A4BUD-001Alvin2024-03-15
6
7control#JanuaryFebruaryMarch
8BUD-001MarkCarloAlvin
9
10JanuaryFebruaryMarch
11BUD-001MarkCarloAlvin
Sheet1
Cell Formulas
RangeFormula
B10B10=DATE(2024,1,1)
C10:D10C10=EDATE(B10,1)
B11:D11B11=INDEX($C$2:$C$5,MATCH(MAX((MONTH($D$2:$D$5)=MONTH(B10))*($D$2:$D$5))&$A11,$D$2:$D$5&$B$2:$B$5,0))
 
Upvote 0
Solution
I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

Is this what you are after?
24 01 19.xlsm
ABCDEFGH
1control #NameDateControl #JanuaryFebruaryMarch
2BUD-001Name 15/01/2024BUD-001Name 2Name 3Name 4
3BUD-001Name 231/01/2024BUD-002 Name 6Name 7
4BUD-001Name 325/02/2024
5BUD-001Name 415/03/2024
6BUD-002Name 515/02/2024
7BUD-002Name 618/02/2024
8BUD-002Name 716/03/2024
Latest hire
Cell Formulas
RangeFormula
F2:H3F2=IFERROR(INDEX($B:$B,AGGREGATE(14,6,ROW($C$2:$C$8)/(($A$2:$A$8=$E2)*(TEXT($C$2:$C$8,"mmmm")=F$1)),1)),"")
yes sir it is like that, thankyou I will use XL2BB next time

but is is not working for me
 
Upvote 0
I came up with this way, not sure if it is as comprehensive as @Peter_SSs 's version.
It requires you to have a date formatted as long month name for the column headers.

Book1
ABCD
1control #NameDate Hired
2A1BUD-001Angelo2024-01-05
3A2BUD-001Mark2024-01-31
4A3BUD-001Carlo2024-02-25
5A4BUD-001Alvin2024-03-15
6
7control#JanuaryFebruaryMarch
8BUD-001MarkCarloAlvin
9
10JanuaryFebruaryMarch
11BUD-001MarkCarloAlvin
Sheet1
Cell Formulas
RangeFormula
B10B10=DATE(2024,1,1)
C10:D10C10=EDATE(B10,1)
B11:D11B11=INDEX($C$2:$C$5,MATCH(MAX((MONTH($D$2:$D$5)=MONTH(B10))*($D$2:$D$5))&$A11,$D$2:$D$5&$B$2:$B$5,0))
THANKYOUUUU IT WORKS.
Thank you so much
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,956
Members
449,096
Latest member
Anshu121

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