I have this simple statement in `excel`

. I compare two dates. If the date 2 is greater than or equal to date 1, then I show **1**. If not, then I show **0**.

However, I would like to apply this function **only** when the cells contains text:

```
IF(NOT(ISBLANK((Q2<=R2;"1";"0")))
```

That gives me an error – what am I doing wrong?

## Best Answer

Your formula is wrong. You probably meant something like:

Another equivalent:

Or even shorter:

OR EVEN SHORTER: