IF function with AND

Copper Contributor

Why is: IF(AND(Z5>4,5,Z5<9,5);1;"") wrong?

3 Replies




Replace " ; " with " , " as in above formula.

Same result. I changed the logical test with an integer for easier reading.
The error code is:
"There's a problem with this formula.
Not trying to type a formula?
When the first character is an equal ("=") or minus ("-") sign, Excel thinks it's a formula:
• you type: =1+1, cell shows: 2
To get around this, type an apostrophe ( ' ) first:
• you type: '=1+1, cell shows: =1+1"
This solved it: =IF(AND(Z5>4;Z5<10);1;"")

Thanks for your response!