Using “If cell contains #N/A” as a formula condition.

calendar_today Asked Jan 7, 2014
thumb_up 41 upvotes
history Updated April 16, 2026

Question posted 2014 · +21 upvotes

I need help on my Excel sheet. How can I declare the following IF condition properly?

if A1 = "n/a" then C1 = B1
else if A1 != "n/a" or has value(int) then C1 = A1*B1

Accepted answer +41 upvotes

Input the following formula in C1:

=IF(ISNA(A1),B1,A1*B1)

Screenshots:

When #N/A:

enter image description here

When not #N/A:

enter image description here

Let us know if this helps.

Top excel Q&A (6)

+41 upvotes ranks this answer #7 out of 167 excel solutions on this site — top 4%.