+ Reply to Thread
Results 1 to 2 of 2

Help needed to do a lookup and replace

  1. #1
    Registered User
    Join Date
    03-01-2007
    Posts
    41

    Help needed to do a lookup and replace

    I have Sheet1 for location column and location shortform column and Sheet 2 for location column only. Anyway i can replace the location in sheet2 with the shortform location if it matches sheet1 location. AS attached file
    Attached Files Attached Files

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

    Re: Help needed to do a lookup and replace

    It is not a good idea to use Merged Cells.

    You can put this formula in B1 of Sheet2:

    =IFERROR(VLOOKUP(A1,Sheet1!A:B,2,0),A1)

    then copy it down. It will give you the abbreviation if the name is recognised, otherwise it will give the original name. However, you will also see zero on (most) alternate rows, because of your merged cells.

    You can fix the values in column B, then delete column A, and then sort that column if you want to remove the zeros.

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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