+ Reply to Thread
Results 1 to 5 of 5

Removing/Adding text to cells

  1. #1
    Registered User
    Join Date
    08-05-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    36

    Question Removing/Adding text to cells

    Hi,

    I have about 700 items that when I try to search and replace the prefix (i.e: cell contains "UPC 070235856985" and I'm trying to remove UPC and the space from the front of the cell so that I can vlookup the number on a different spreadsheet. Both fields are set up as text,) it removes the 0 in front of the number, rendering vlookup useless.

    When trying to record a macro and running it, all it does is replace all cells with the original cell where I recorded the macro.

    Any help would be MAGNIFICENT! Thank you!

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Removing/Adding text to cells

    You could use a wildcard in your vlookup. That way no matter how it starts, it will find the number you need. No replacement necessary.

    =Vlookup("*YOUR NUMBER",YOURTABLE,1,False)

    Note the *

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Removing/Adding text to cells

    Hi,

    Why not just use a helper column and enter
    Please Login or Register  to view this content.
    copy it down then Copy the helper column and paste it back as values to your original column.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor meyero90's Avatar
    Join Date
    03-24-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    202

    Re: Removing/Adding text to cells

    try this assuming your word is in A1:
    =RIGHT(TRIM(A1),FIND(" ",TRIM(A1))+8)
    If I helped, Don't forget to add to my reputation (click on the little scale)
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)

  5. #5
    Registered User
    Join Date
    08-05-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: Removing/Adding text to cells

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Why not just use a helper column and enter
    Please Login or Register  to view this content.
    copy it down then Copy the helper column and paste it back as values to your original column.

    HTH
    Absolutely magnificent. Thank you so much!

+ 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