Search code examples
exceldatetimeexcel-formula

Excel, How do I ignore the time in a date


I am working on a project where I get repeated measures on a given date. The device automatically includes a timestamp, of which I don't need.

| 5/6/24 4:12 PM  | 48.60808 |

| 5/6/24 4:11 PM  | 46.37984 |

| 4/29/24 4:16 PM | 47.12185 |

| 4/29/24 4:14 PM | 43.83653 |

| 5/14/24 4:17 PM | 46.34968 |

| 5/14/24 4:12 PM | 48.39215 |

I am trying to find the max value of latest date regardless of time stamp. I've tried using a MAXIFS formula and using INT(), DATEVALUE(), TRUNC(), and even DATE() where I pull the each portion individually, but nothing has worked. Any suggestions would be greatly appreciated!


Solution

  • Using INT and MAX:

    =MAXIFS(B1:B6,A1:A6,">="&INT(MAX(A1:A6)))
    

    enter image description here


    A similar option suggested by Mayukh Bhattacharya:

    =MAX(FILTER(B1:B6,MAX(INT(A1:A6))=INT(A1:A6)))