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
invlookup
, returns value column №3
- i'm using 4th argument
vlookup
equalsfalse
, in casevlookup
find exact match, , values in first column oflist!a:c
not need sorted (opposite case when you're usingtrue
).
Comments
Post a Comment