I have an excel sheet with 2 columns
Column A = "CA", "CR" or "IN"
Column B = Date & time format DD/MM/YYYY HH:MM
I want to make a count at the bottom of a column for each row that has this criteria:
i) Row 1-8 = "CA"
ii) Row 1-8 needs to check for a time range, namely > "17:00" and < "04:59"
This is what I've come up with so far:
=COUNTIFS(A2:A8,"CA",B2:B8,RIGHT(TEXT(B2:B8,"hh:mm"),5)>"04:59"), B2:B8,RIGHT(TEXT(B2:B8,"hh:mm"),5)<"17:00")
I presume using a range within a the text function is wrong, but don't know how to resolve this.
Because Column B is in a date and time format, I'm having to change it to a string within the function so I can make a test on just the time - Maybe there's a better way?)
Thanks