+ Reply to Thread
Results 1 to 17 of 17

Remove unwanted text and numbers from lists (whilst keeping one value/word)

  1. #1
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Hi

    I would really appreciate some help. I want to know if there away of removing all but "one word" from a column of data. In the attached example, I want to remove all the value except for the word "TESCO" from the cells in the column that have the word "TESCO" in them

    Is there a function for this?

    SEE ATTACHED
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Yes;


    =IF(ISNUMBER(SEARCH("TESCO",A2)),"Tesco",A2)

    copied down.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Hi Glenn

    Thanks for the reply, but I wanted to remove everything else , so that all that is left in the cell is "TESCO".... I think your formula removes "TESCO".... which is the opposite of what I am after. It's driving me round the bend!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Try this tweak:

    =IF(ISNUMBER(SEARCH("TESCO",A2)),"Tesco","")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Hi AliGW

    Yes, that works.... thanks Ali 😊👌👍

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Small macro on green button
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Hi Ali.... I did what you said re. the Star..... However, I can't see the link "Thread Tools".... can you tell me where that is? (sorry to be a nuisance)

  9. #9
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Brilliant torachan!.... how did you do that? (if you don't mind me asking.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Quote Originally Posted by joedoherty View Post
    Hi Ali.... I did what you said re. the Star..... However, I can't see the link "Thread Tools".... can you tell me where that is? (sorry to be a nuisance)
    To be clear, I did not TELL you to reward rep - I just said it was possible should you wish to do so, but thanks.

    The thread tools drop-down is top right (just above the opening post), or you could edit the opening post and go advanced to change the drop-down selector next to the title box to solved.

  11. #11
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    👍 understood

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Great - so can you mark it as solved, then?

  13. #13
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    No not yet, as there is another member I am communicating with, he/she sent me a solution using a macro... so I am waiting on a reply

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    Ah, OK - Torachan isn't currently online. I'm sure he'll give you the help you've asked for soon.

  15. #15
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    👍 Yes, I am waiting on a reply from Torachan

  16. #16
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    right mouse click on sheet1 tab - small menu appears - select 'view code' - this code is in the 'sheet module' triggered by the 'command' button.
    alternatively the code could be placed in a 'standard module' and run as a macro from the macro reader.
    the code is almost 'english' to understand - find the last row in column 'A' - then loop through rows 2 to ALastRow - assign the value in each cell individually to variable 'a' as a string - use the VBA function 'Instr' - to see if the string "TESCO" is in string variable 'a' - if true then overwrite the cell value with "TESCO"

    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    01-28-2021
    Location
    Donegal, Ireland
    MS-Off Ver
    MS Office 16
    Posts
    9

    Re: Remove unwanted text and numbers from lists (whilst keeping one value/word)

    That's great help, thanks a lot torachan.... much appreciated. Great help from you both (yourself and AliGW)

+ 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. [SOLVED] Remove unwanted digits/text
    By abulkhairi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2017, 02:37 AM
  2. how to remove the unwanted zero in a cell in Text properties
    By kwfine in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-11-2017, 02:41 PM
  3. want to remove unwanted text from my sheet
    By notbanme in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2016, 01:52 AM
  4. Replies: 8
    Last Post: 11-19-2014, 06:12 PM
  5. [SOLVED] Remove unwanted text/ numbers from name
    By MATU70 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 05-13-2014, 02:31 PM
  6. Excel 2007 : Remove Unwanted Text from Cells
    By rickygzz in forum Excel General
    Replies: 6
    Last Post: 08-01-2011, 10:28 PM
  7. How to remove unwanted green horizontal lines in Word Table?
    By cherokee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-26-2006, 11:35 AM

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