+ Reply to Thread
Results 1 to 5 of 5

Stripping The Rubbish

  1. #1
    Registered User
    Join Date
    10-07-2009
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2003
    Posts
    13

    Stripping The Rubbish

    I have a spreadsheet with several hundred rows, and part of each of is 5 cells with description of the coupon cost of freight cahrges, in the following format

    xx M & xx E

    The xx before the M and the E can be 1 or 2 digits, and I want to make all the cells just the value between the & and the E as the rest is redundant how the form is setup. I have tried reading webs sites to do this, and cant figure out how to use the find/replace excel tool. Is there an easy way i can do this and highlight all the cells to do it in one go????
    thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Stripping The Rubbish

    Let's say that string value is in column C.

    1) Off the the right in an empty column, enter this formula:

    =TRIM(MID(C1,FIND("&",C1)+2,2))+0

    Adjust that red value to the correct reference for the first value.

    2) Copy that down the whole data set, the new values will appear

    3) Copy the whole column of new values

    4) Click on the old column and select Edit > Paste Special > Values

    5) The new values are now in the old column, you can delete the new column
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-07-2009
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Stripping The Rubbish

    That code works and gives me the right values I wanted to keep, but how would u modify that so if you delete the original columns so that the cells that code created are the ones being used now?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Stripping The Rubbish

    Steps 2, 3 and 4 above indicate how to make the new values the permanent ones. Did you go through all the steps?

    If you don't want to follow those instructions and replace the old values with the new ones, you can use the same steps to copy/pastespecial>values the new data over the top of itself to remove the formulas.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Stripping The Rubbish

    PP, please amend your thread title.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ 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