Return MAX Date in column per unique ID and also return value of 1 in column where that row contains MAX date per unique ID

David0227

New Member
Joined
Mar 1, 2020
Messages
14
Office Version
  1. 2011
  2. 2010
  3. 2007
Platform
  1. Windows
  2. MacOS
I am looking to calculate row C and Row D

In C I want to return the max date per service from column B but it to show for each row of that service
in D I want to return a value of 1 in the row where the MAX date per servive exists

Appreciate any help, thanks



Book1
ABCD
1ServiceDateMax Date ServiceRow with Max Date Service
211/24/991/25/99
311/25/991/25/991
422/24/982/24/981
532/25/982/25/981
642/25/982/25/981
752/27/982/28/98
852/28/982/28/981
963/1/983/1/981
Sheet1
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Upvote 0
Thank you. One additional point i didnt think of was I only want a 1 to return in column d for one of the entries if the dates for a service match. For example, if B2 and B3 both were 25/01/99 id only want a 1 in D3
 
Upvote 0
How about
=IF(AND(B2=C2,COUNTIFS(A$2:A2,A2,B$2:B2,B2)=COUNTIFS(A:A,A2,B:B,B2)),1,"")
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
I am looking for another layer to this to help.

I only want to include service rows in column C and D calculations if the column B date is before or equal to the service completion date in column E.

For example, row 4 would be excluded from row C and D calculations as the service completion date was the 25th January and B4 is after that date on the 26th

Help is very much appreciated.



Book1
ABCDE
1ServiceDateMax Date ServiceRow with Max Date ServiceSerrvice Completion Date
211/24/991/25/991/25/99
311/25/991/25/9911/25/99
411/26/991/25/99
Sheet1
 
Upvote 0
As this is now a different question, you will need to start a new thread. Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,423
Messages
6,119,398
Members
448,892
Latest member
amjad24

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