Forum Discussion
Harry_I
Jan 06, 2022Copper Contributor
IF function with AND
Why is: IF(AND(Z5>4,5,Z5<9,5);1;"") wrong?
3 Replies
Sort By
- OliverScheurichGold Contributor
- Harry_ICopper ContributorSame result. I changed the logical test with an integer for easier reading.
=IF(AND(Z5>4,Z5<9),1,"")
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"- Harry_ICopper ContributorThis solved it: =IF(AND(Z5>4;Z5<10);1;"")
Thanks for your response!