New Contributor

# 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.

3 Replies

# Re: Nested IF AND not working

@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"

# Re: Nested IF AND not working

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

# Re: Nested IF AND not working

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",)))