1

I have an excel table with a list of dates like this:

12.12.2022 20:13
12.12.2022 20:30
12.12.2022 21:06
12.12.2022 21:55
12.12.2022 22:03

14.12.2022 18:24
14.12.2022 19:24

15.12.2022 17:45
15.12.2022 18:55
15.12.2022 20:03

01.01.2023 20:04

The list contains values for different years and not all days have values. I want to get the number of days with existing list entries in 2022. So for the example list the result should be 3, because the last value es already 2023.

I guess it must work with UNIQUE somehow, but I don't know how. The date field is formatted like this: TT.MM.JJJJ hh:mm

The value is: 14.12.2022 19:24:00

Thank you for your help!

1 Answer 1

5

With O365:

=LET(ζ,A1:A14,ROWS(UNIQUE(FILTER(INT(ζ),YEAR(ζ)=2022))))

Sign up to request clarification or add additional context in comments.

9 Comments

Not working with O365 Excel 2211. I doesn't recognize the symbol that is the first variable to LET
@user3549835 change that symbol to a letter or word you like
Thank you. It works. Just for info: Why do I need the rows function?
ROWS is one option to count the number of entries returned by UNIQUE.
Is there a way by any chance to modify the function so that a new day starts at 6 AM? e.g. an entry on 02 JAN 2023 05:00 AM should be accounted as an entry on the 1st of JAN
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.