IF formula on time cell not working
问题 IF(AND(H$2>=$B2,H$2<=$C2),"X","") Works for 08:30-15:30 and 9:30-18:30 , but it does for shift 19:30-4:30 check the image (highlighted in yellow cell) 回答1: A "simple" solution would be to check if start is bigger than end . In that case, you will need to check for time >= start OR time <= end Something like : =IF( $B2<$C2; IF(AND(H$2>=$B2;H$2<=$C2);"X";""); IF(OR( H$2>=$B2;H$2<=$C2);"X";"") ) 回答2: Better to include date part into your formula of each cell showing time and re-format these