ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Match Date/Time to Date list (https://www.excelbanter.com/excel-worksheet-functions/162318-match-date-time-date-list.html)

Sandy

Match Date/Time to Date list
 
I have a Date/Time in A1 (mm/dd/yy hh:mm) and a list of dates (mm/dd/yy) in
D1:D10. I would like a formula to compare the date/time to the date list and
return "yes" if it is in the list and "no" if not.
Thanks

Bob Umlas, Excel MVP

Match Date/Time to Date list
 
=IF(ISNA(MATCH(INT(A1),D1:D10,0)),"no","yes")
Bob Umlas
Excel MVP

"Sandy" wrote:

I have a Date/Time in A1 (mm/dd/yy hh:mm) and a list of dates (mm/dd/yy) in
D1:D10. I would like a formula to compare the date/time to the date list and
return "yes" if it is in the list and "no" if not.
Thanks


Rick Rothstein \(MVP - VB\)

Match Date/Time to Date list
 
Give this a try... put this formula in, say, B1 and copy down...

=IF(ISERROR(VLOOKUP(INT(A1),B1:B23,1,FALSE)),"No", "Yes")

Rick


"Sandy" wrote in message
...
I have a Date/Time in A1 (mm/dd/yy hh:mm) and a list of dates (mm/dd/yy) in
D1:D10. I would like a formula to compare the date/time to the date list
and
return "yes" if it is in the list and "no" if not.
Thanks



T. Valko

Match Date/Time to Date list
 
Another one:

=IF(COUNTIF(D1:D10,INT(A1)),"Yes","No")

--
Biff
Microsoft Excel MVP


"Sandy" wrote in message
...
I have a Date/Time in A1 (mm/dd/yy hh:mm) and a list of dates (mm/dd/yy) in
D1:D10. I would like a formula to compare the date/time to the date list
and
return "yes" if it is in the list and "no" if not.
Thanks




Sandy

Match Date/Time to Date list
 
Thanks to all!


All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com