Hello,
I need help with an issue that I can't get with the IF formula.
If the clock(time) is between 00:00 and 06:00h to return 1.
ie:if it's 01:00am to return 1. If not, return 0.
How can I get this solution?
Thank you.
Regards,
Riste.
Hi Riste,
Times and dates are stored as 'serial' numbers in excel so if your time is in A1 you can use
=IF(AND(A1>0,A1<0.25),1,0)
This article explains Date and Time in Excel
Regards
Phil
Thank you Phil.
I appreciate it.
Best Regards,
Riste.
Hi Riste,
If your cell might also have a date component and you only wish to check that the time part is before 6am then you could use:
=--(ISNUMBER(A1)*(MOD(N(A1),1)<=0.25))
blanks, text and any times after 6am will return 0; times between midnight and 6am (inclusive) will return 1
Regards
jim