+ Reply to Thread
Results 1 to 9 of 9

vlookup if problem

  1. #1
    Registered User
    Join Date
    07-11-2016
    Location
    usa
    MS-Off Ver
    2016
    Posts
    78

    vlookup if problem

    Hi,

    I have two sheets, sheet 1 and 2. Col A of sheet 1 has the user input which has some typos in the country names. Column B is where i need my typo corrected output. I have another sheet 2 which has the mapping for corrections (column A is the assumed typos and Col B is the mapped good name).

    If i encounter a misspelled country name in Col A sheet 1, then in Col B, i need a formula to lookup its corrected name from sheet 2. If the name in Col A sheet 1 is correct(ie no typos), then it should just carry over that name to col B without running the v lookup formula.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: vlookup if problem

    That's the purpose of Data Validation dropddown lists: save time, prevent entry errors...
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    07-11-2016
    Location
    usa
    MS-Off Ver
    2016
    Posts
    78

    Re: vlookup if problem

    Hi,

    Thanks for your reply...but i need a formula to make it work in this case. Would the if(vlookup) formula work? I am probably making a mistake in how i typed the formula.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: vlookup if problem

    You need a list of ALL mistakes and variations possible so you can look up each one....
    Last edited by protonLeah; 09-17-2020 at 03:29 PM.

  5. #5
    Registered User
    Join Date
    07-11-2016
    Location
    usa
    MS-Off Ver
    2016
    Posts
    78

    Re: vlookup if problem

    It will not be a huge list. Just a sample set. Assuming this is all the typos there is, would you be able to suggest a formula?

  6. #6
    Registered User
    Join Date
    07-11-2016
    Location
    usa
    MS-Off Ver
    2016
    Posts
    78

    Re: vlookup if problem

    Nevermind...i was able to figure out the formula. Thanks for your suggestion and time.

  7. #7
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: vlookup if problem

    Hi redJohn89

    the quick formula will be
    B2
    =IFERROR(INDEX(Sheet2!A:A,MATCH(A2,Sheet2!A:A,0)), INDEX(Sheet2!A:A,MATCH(A2,Sheet2!B:B,0)))
    Christopher Yap

  8. #8
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,408

    Re: vlookup if problem

    Not sure what you want, provide two different methods

    B2 cell formula
    HTML Code: 
    HTML Code: 

  9. #9
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: vlookup if problem

    or

    =IFERROR(VLOOKUP(A2,Sheet2!A:A,1,FALSE), VLOOKUP(A2,Sheet2!B:B,1,FALSE))

+ 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. vlookup problem
    By Neneto143 in forum Excel General
    Replies: 1
    Last Post: 02-01-2016, 11:40 AM
  2. Vlookup problem in a loop with cell property and variable cell problem (long title sry)
    By ExcelsiorLux in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 10:38 AM
  3. Replies: 6
    Last Post: 05-28-2013, 05:08 PM
  4. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  5. vlookup problem and count problem
    By thy00123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2009, 04:31 AM
  6. VLOOKUP Problem
    By Tosca in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. [SOLVED] VLOOKUP problem
    By SHIPP in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2005, 10:11 PM

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