Forum Discussion

liang17's avatar
liang17
Copper Contributor
Jul 01, 2020
Solved

Quotations in conditional formulas

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? 

  • liang17 

     

    Maybe this from Excel Help will help.

    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"

2 Replies

  • mathetes's avatar
    mathetes
    Silver Contributor

    liang17 

     

    Maybe this from Excel Help will help.

    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"

    • liang17's avatar
      liang17
      Copper Contributor
      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.

Resources