Find date of max occurrence of name from table

eggman9

New Member
Joined
Jul 26, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I am looking for a formula to calculate the date that a sales person makes the most sales. I have a huge table that looks similar to this:

Sale DateName
1/5/22Sam
1/5/22Frank
1/6/22Bob
1/7/22Frank
1/7/22Frank
1/7/22Frank

I want to enter the name I am interested in finding, and it would output the date that the person sold the most. In this example, if I were interested in Frank, it would output 1/7/22 because that is the date that his name appears the most.

Please let me know if this requires further clarification, thanks!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi & welcome to MrExcel.
Feel sure there must be a simpler way, but how about
Fluff.xlsm
ABCDE
1Sale DateName
201/05/2022SamFrank01/07/2022
301/05/2022Frank
401/06/2022Bob
501/07/2022Frank
601/07/2022Frank
701/07/2022Frank
8
9
10
Data
Cell Formulas
RangeFormula
E2E2=LET(u,UNIQUE(FILTER(A2:A20,B2:B20=D2)),c,COUNTIFS(A2:A20,u,B2:B20,D2),FILTER(u,c=MAX(c)))
 
Upvote 0
Hello and thank you for your reply.

Unfortunately in practice this appears to yield a range of dates, and if I use control-shift-enter, it simply displays the first date the name appears. Not sure exactly why, I have never used Let so I don't know what the output should be
 
Upvote 0
In that case can you post some data that shows the problem.
 
Upvote 0
Could you have multiple dates that appear the same number of times? If so what should happen?
 
Upvote 0
How about:

Excel Formula:
=MODE(FILTER(A2:A7,B2:B7=D2))

If you want to list multiple dates that appear the same number of times:

Excel Formula:
=MODE.MULT(FILTER(A2:A7,B2:B7=D2))
 
Upvote 0
Solution
These solutions all work when I try them in a test file, but I am still having trouble implementing them in my live file. Maybe this is because I am referencing a power query that is merging several files together on a separate sheet from where I am trying to display the dates?
 
Upvote 0
In what way don't they work?
 
Upvote 0
Various errors, the latest says Value not Available Error
 
Upvote 0
Check that your dates are real dates & not text.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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