Forum Discussion

paul_fereday's avatar
paul_fereday
Copper Contributor
May 13, 2022

Nested IF AND not working

Hi all where have I gone wrong with this =IF(AND(D339=0,$Q$337=0),Q339"",IF(AND(D339=VAT20_1,$Q$337),Q339"Y",IF(AND(D339=VAT20_3,$Q$337),Q339"Y",))) excel says it is not a formula. 

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    paul_fereday

    =IF(AND(D339=0,$Q$337=0),Q339"",IF(AND(D339=VAT20_1,$Q$337),Q339"Y",IF(AND(D339=VAT20_3,$Q$337),Q339"Y",)))

     

    What are you trying to return with the red parts? If you want to concatenate something with cell Q339 you should use Q339&"Y"

     

    And regarding the blue parts, are these named ranges or texts? If these are texts you should put quotations marks around them, like "VAT20_1"

    • paul_fereday's avatar
      paul_fereday
      Copper Contributor

      Hi the blue parts are named ranges and the red ones are where i want my result either do nothing or the letter YRiny_van_Eekelen 

      • paul_fereday's avatar
        paul_fereday
        Copper Contributor
        Hi thanks for your input but i have just sorted it =IF(AND(D338=0,$Q$337=0),"",IF(AND(D338=VAT20_1,$Q$337="y"),"Y",IF(AND(D338=VAT20_3,$Q$337="y"),"Y",)))

Resources