Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a table of values with different date times. I'm attempting to create a new columns that sorts values that fall within a specific time range of 6:00am to 6:00pm. The physical calendar day does not matter, so I'm attempting to use wildcard but I keep coming up with a False result for values that should be true.

enter image description here

Here's what I have.

=IF(AND(A2>="*"&"06:00 AM",A2<"*"&"18:00 PM"),B2,"0")

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
458 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try:

=IF(AND(MOD(A2,1)>=TIME(6,0,0),MOD(A2,1)<TIME(18,0,0)),B2,0)

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...