Mr Excel Questions 73.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | |||||
2 | DateTime1 | 12/05/2023 10:30 AM | |||
3 | DateTime2 | 12/05/2023 10:30 PM | |||
4 | |||||
5 | Test DateTime | In Range | |||
6 | 12/04/2023 01:00 PM | FALSE | |||
7 | 12/05/2023 05:00 AM | FALSE | |||
8 | 12/05/2023 10:30 AM | TRUE | |||
9 | 12/05/2023 05:00 PM | TRUE | |||
10 | 12/05/2023 11:40 PM | FALSE | |||
11 | 12/06/2023 05:00 AM | FALSE | |||
NikiDivi |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B6:B11 | B6 | =AND(A6>=$B$2,A6<=$B$3) |
=AND(F2>=$E$2,F2<=$E$2)
=AND(E2>=F2,E2<=G2)
=AND(D2>=E2,D2<=F2)
Rick, great points about the time intervals. But, he does mention that he has 600 dates to review, maybe there are some include dates. I also think the first column could be a text value instead of a date value because of the left justification.Your dates in Column D are not in the same month as those in Columns E and F. For example, your date in cell D2 is 2/1/2023 and you are checking it against (omitting the leading zeros) 1/2/2023 dates. Second, your start and end dates are both the same day with a 15-minute span, but the dates in Column D have no time value associated with them, so by default, they are assumed to be midnight. That means even if you straighten out the month differences, you will never get a TRUE because you have no time value to check.
True, but the impression I got from his post was that he expected the ones he showed us to be TRUE. But I could be wrong, of course.Rick, great points about the time intervals. But, he does mention that he has 600 dates to review, maybe there are some include dates. I also think the first column could be a text value instead of a date value because of the left justification.