SOLVED

Quotations in conditional formulas

Copper Contributor

Hi everyone - I have a question on when to use quotations in conditional formulas. For example, in COUNTIFS function, for condition "<=", the formula should be = COUNTIFS(XXXX,"<="&A1). The quotations have to be included. However, in IF function, it should be = IF(XXXX<=XXXX). My question is why quotations are not included here. When should the quotations be used? 

2 Replies
best response confirmed by liang17 (Copper Contributor)
Solution

@liang17 

 

Maybe this from Excel Help will help.

mathetes_0-1593627737135.png

It's a bit ambiguous, to be sure. The fact that either 32 or "32" is acceptable is confusing. It appears that the >= by itself is not in quotes, it would be the entire expression, ">=32"

Thanks, @mathetes for the reply. This is what I am thinking. <= by itself in COUNTIF formula seems an expression so Excel doesn't recognize it. However, it is okay to not have quotes in IF formulas. It's a bit confusing sometimes. I was searching for the answer - it seems that when to use quotes with conditional statements is unclear. People need to try one and another.
1 best response

Accepted Solutions
best response confirmed by liang17 (Copper Contributor)
Solution

@liang17 

 

Maybe this from Excel Help will help.

mathetes_0-1593627737135.png

It's a bit ambiguous, to be sure. The fact that either 32 or "32" is acceptable is confusing. It appears that the >= by itself is not in quotes, it would be the entire expression, ">=32"

View solution in original post