I am creating a sign in/out system in Excel. I was able to get the sign in and out system to work, however now I need to highlight rows that fit a certain formula.

I have tried this formula:

`=IF(ISBLANK($N$2)AND($P$2>=$K2+$M2,$P$2<>"",$K2<>"",$M2<>""))`

If the rows match these criteria, they will be formatted with a red background color.

I can provide the excel sheet if needed.

The basic info is:

Soldier A, B and or C all sign out together. They fill out a userform with required data, and once they save the form, it transfers their information to the next available row.

What needs to happen is, if the Sign In time column in each row is empty and the Sign Out time PLUS the Allotted time (sort of like a time limit) is `<= NOW()`

, then the row should be formatted.

So far, I have been unable to accomplish this.

`AND`

doesn't work that way, try:`=IF(AND(ISBLANK($N$2),$P$2>=$K2+$M2,$P$2<>"",$K2<>"",$M2<>""))`

– cybernetic.nomad Apr 3 at 14:35`IF`

can be skipped altogether:`AND(ISBLANK($N$2),$P$2>=$K2+$M2,$P$2<>"",$K2<>"",$M2<>"")`

– user313811 Apr 3 at 16:27`$`

are placed correctly. – piko Apr 4 at 10:38