# Thread: If Statement (Excel 2000)

1. ## If Statement (Excel 2000)

I want to look for number between 0 and 20, in an adjacent cell, - if the number is in the range put

2. ## Re: If Statement (Excel 2000)

Hi & Welcome

<code>=IF(AND(L962 >= 0,L962 < 21,L962<>""),"u","")</code>

3. ## Re: If Statement (Excel 2000)

Thanks and many thanks.
It's now working a treat!
Do you know if there's a similar trick when using Conditional Formatting? I also want to highlight cell L962 in red if it's between 0 and 20, but when I add the conditional format if the cell is Null the cell is showing red.
Thanks again, Lucy

4. ## Re: If Statement (Excel 2000)

I tried it with the "Formula is" option and null cells is not highlighted in red. The attachment shows the conditional formatting dialog I used.

5. ## Re: If Statement (Excel 2000)

Thanks, you're a star

6. ## Re: If Statement (Excel 2000)

If you put an AND in a statement like this, is there a limit on the number of conditions one can list (3 here).

Thanks.

7. ## Re: If Statement (Excel 2000)

You can only have 3 conditions. A single condition may contain multiple ANDs and ORs and NOTs. Those are not limited to 3.

Steve

8. ## Re: If Statement (Excel 2000)

I think that the number of conditions in an AND function is limited to 30, not 3.

9. ## Re: If Statement (Excel 2000)

I guess I should have elaborated in my statement:
I consider a "condition" as in the Condition 1- Condition3 of the conditional formatting (which is limited to 3). A condition is the "RESULT" of the formula (TRUE or FALSE)

Within each of those (3) conditons you can have multiple uses of ANDs and ORs. AND/OR/NOT limited to 30 (?) and also only 7 nested functions.

Steve

10. ## Re: If Statement (Excel 2000)

I read the question as the limit on the number of conditions in the AND since he is using the AND to increase the number of conditions that can be tested. I guess it could be interpreted either way.

11. ## Re: If Statement (Excel 2000)

Looking at it again, you are probably correct in your interpretation of the original question.

Steve

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•