+ Reply to Thread
Results 1 to 5 of 5

Remove specific text from only certain cells

  1. #1
    Registered User
    Join Date
    02-06-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    27

    Remove specific text from only certain cells

    I am exporting lots of data from a website and for some reason to do with html i am getting   in a few cells in my description column (column C), i think that means "& " in html. this occurs in some cells but not others when i paste it into Excel. I would like to remove these characters.

    I know I can do it with crtl H and the replace field blank but I would like a formula so in the future the user will simply have to paste information and then get converted information out (as they will struggle to use excel).

    I think i need to use a combination of IF, FIND, REPLACE, LEN but i am struggling.

    In a follow up problem some cells contain &amp which i believe is &, i would also like to convert this &amp back to &.

    Many Thanks for any help

    Ashley
    Last edited by amoorman; 02-09-2009 at 09:13 AM.

  2. #2
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465

    Re: Remove specific text from only certain cells

    Hello, amoorman

    Can you please attach a sample file for your problem and please tell what result do you want.
    __________________
    Regards
    Rahul Nagar
    Founder of www.myshortcutkeys.com.


    If you get the answer of your questions then please click EDIT in your original post then click on GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  3. #3
    Registered User
    Join Date
    02-06-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Remove specific text from only certain cells

    Hi thank you very much,

    As you can see in column B there is some irrelevant data. How can i remove this?

    Many thanks

    Ashley
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Remove specific text from only certain cells

    Hi Ashley

    try this formula in C2 copied down:

    =SUBSTITUTE(SUBSTITUTE(B2,"&",""),"nbsp;","")

    Richard
    Richard Schollar
    Microsoft MVP - Excel

  5. #5
    Registered User
    Join Date
    02-06-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Remove specific text from only certain cells

    AH! I had never used substitute before.
    Your solution is nearly perfect however the where &amp was present that was removed and not changed to & (probably due to my poor explanation).

    This solution solves that issue as well.

    =SUBSTITUTE(SUBSTITUTE((SUBSTITUTE(B8,"&","&")),"&",""),"nbsp;","")

    Thank You!

+ 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