+ Reply to Thread
Results 1 to 5 of 5

Vlookup to return something other than the value

  1. #1
    Registered User
    Join Date
    09-25-2019
    Location
    Arizon
    MS-Off Ver
    Arizona
    Posts
    3

    Vlookup to return something other than the value

    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 ?

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Vlookup to return something other than the value

    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: copy to clipboard
    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.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,604

    Re: Vlookup to return something other than the 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

  4. #4
    Registered User
    Join Date
    09-25-2019
    Location
    Arizon
    MS-Off Ver
    Arizona
    Posts
    3

    Re: Vlookup to return something other than the value

    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!

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Vlookup to return something other than the value

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] IF logical test pass return with 1st LOOKUP if true, if false then return with 2nd VLOOKUP
    By powerzasty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-21-2017, 03:55 PM
  2. Userform to return vlookup then reference vlookup text
    By BG1983 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2016, 02:09 PM
  3. [SOLVED] vba - check value and vlookup, jump to next collum same row and return vlookup again
    By Elitdarkphoenix in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-19-2015, 04:20 AM
  4. Vlookup to return multiple rows in return
    By Excelhelpss in forum Excel General
    Replies: 1
    Last Post: 06-18-2015, 09:59 AM
  5. Replies: 1
    Last Post: 02-20-2014, 08:42 AM
  6. [SOLVED] Formula to always return cell below what a vlookup would return
    By KCHEXCEL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2013, 12:57 AM
  7. Worksheet function Vlookup and VLOOKUP return different results
    By zandero in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2010, 08:24 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1