I would like it if I could have a vlookup return a chosen value, instead of what I am looking up. for instance, if I am vlook-ing up the phoen number "123456789", or a name "john doe", is there way so the result can be the value 1 ?
I would like it if I could have a vlookup return a chosen value, instead of what I am looking up. for instance, if I am vlook-ing up the phoen number "123456789", or a name "john doe", is there way so the result can be the value 1 ?
If you're goal is to search a column and if a value is found then return 1, you can use IF and MATCH, like so:
Formula:Please Login or Register to view this content.
You probably could use IF(ISERROR(VLOOKUP... but VLOOKUP is mostly used when you want to return a value from another column to the right of the found search value.
Another way is to use COUNTIF, like this:
=--(COUNTIF(A1:A20,"John Doe")>0)
although this returns zero if there is no match.
Hope this helps.
Pete
That works, thanks Paul! Was trying a lot of IF + Match combos as a way to side-step the vlookup, this worked for numbers, names, and address; thanks again!
You're welcome.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks