Check if an excel cell exists on another worksheet in a column - and return the contents of a different column -


what want if contents of cell d3 (on current worksheet) exist in column a in first worksheet (in case entitled list). (and exist somewhere). return contents of corresponding row in column c.

in other words if matching cell found in row 12 - return data c12.

i've used following syntax can't seem last part work correctly.

=if(iserror(match(d3,list!a:a, 0)), "no match", vlookup(d3,list!a:a,1,true)) 

how fix formula?

you can use following formulas.

for excel 2007 or later:

=iferror(vlookup(d3,list!a:c,3,false),"no match") 

for excel 2003:

=if(iserror(match(d3,list!a:a, 0)), "no match", vlookup(d3,list!a:c,3,false)) 

note, that

  • i'm using list!a:c in vlookup , returns value column № 3
  • i'm using 4th argument vlookup equals false, in case vlookup find exact match, , values in first column of list!a:c not need sorted (opposite case when you're using true).

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -