if statement involving text

D

dragomira

in my project i compare two columns using vlookups and get a number of #N/A.
i am trying to come up with an if statement where if i have #N/A, i want a
return of 0, but if not i want the return of the value in another cell in a
field called "status". the field "Status" says "open", "closed" or other.i
tried general functiosn such as
=IF(B3=#N/A,0,H3) where col B contains the result of the vlookup (#N/A or
the value i was looking for), and col H contains status in text. the formula
i came up with didnt help, returns #N/A.

thx
 
J

John Bundy

you would use isna such as
=IF(ISNA(VLOOKUP(B1,Sheet2!A1:C18,2,FALSE)),0,VLOOKUP(B1,Sheet2!A1:C18,2,FALSE))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top