Forum Discussion
If Statement Problem
Patrick2788 I followed the second suggestion that you gave me but I keep getting all "0" for some reason. Excel is not linking the start time/end time range to any hour block cell. Am I missing something in the formula maybe?
- Tito1995Mar 09, 2020Copper Contributor
Patrick2788 I did that but for the first appointment which last from 8:35:16 AM to 9:45:58 AM, I keep getting "0" at the 8:00:00 AM - 9:00:00 AM hour block in cell AA2. I should be getting "1" for that one since the appointment takes place during that hour block and the next one (9:00:00 AM - 10:00:00 AM).
- Patrick2788Mar 09, 2020Silver Contributor
If you're able to upload a workbook (Even the first couple rows and the formula), I can have a look.
- Tito1995Mar 09, 2020Copper Contributor
Patrick2788 I am not able to upload a workbook here. It just allows me to send pictures and links.
But the formula I am using is this one: =IF(AND(S1>=MIN($Q2:$R2),S1<=MAX($Q2:$R2)),"1","0").