+ Reply to Thread
Results 1 to 24 of 24

formula to delete word that contains number (VBA now required)

  1. #1
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Lightbulb formula to delete word that contains number (VBA now required)

    Capture.PNG

    When the text has a number, the whole word has to be removed, keeping the rest of the text.

    current: -SD8 DYNA SLIM 22 15 FOX
    final: DYNA SLIM 22 15 FOX

    When the initial word contains no number, the word is still there, keeping the rest of the text.

    current: -SELENIA K 15W40 1L
    end: SELENIA K 15W40 1L

    This for the whole column

    Can someone help me?

  2. #2
    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,647

    Re: formula to delete word that contains number

    This can't be done with a formula unless you use a helper column. Do you want me to move this to the VBA section?
    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.

  3. #3
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    I can create an additional column to have the answer, no problem

  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,647

    Re: formula to delete word that contains number

    OK.

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: formula to delete word that contains number

    With your strings in column A starting with A1, try this in B1:

    =IF(COUNT(FIND({0,1,2,3,4,5,6,7,8,9},LEFT(A1,FIND(" ",A1)))),MID(A1,FIND(" ",A1)+1,LEN(A1)),RIGHT(A1,LEN(A1)-1))

    or slightly shortened:

    =MID(A1,IF(COUNT(FIND({0,1,2,3,4,5,6,7,8,9},LEFT(A1,FIND(" ",A1)))),FIND(" ",A1)+1,2),LEN(A1))
    Last edited by 63falcondude; 03-26-2018 at 12:57 PM.

  6. #6
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    I was sharing the file. But I'll test first 63falcondude.

  7. #7
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    2.PNG

    Look at the error.

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: formula to delete word that contains number

    Please re-read post #4 and post an Excel workbook, not a picture.

    Also, you didn't change all of the references from A1 to G1.

  9. #9
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number


  10. #10
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: formula to delete word that contains number

    Please re-read post #4 again to see how to upload a sample workbook directly to this site.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  11. #11
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number


  12. #12
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: formula to delete word that contains number

    Please re-read post #4 again...

    The attachment that you shared in post #11:
    1) is not an Excel workbook (it's a CSV)
    2) is not at all small
    3) does not include the desired results

    I'll come back once you follow the directions outlined in post #4.

  13. #13
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: formula to delete word that contains number

    Are you working with column B?
    Try in D1 then drag down:
    Please Login or Register  to view this content.
    Quang PT

  14. #14
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    the text is in column G

  15. #15
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    It returns me the excel with the formula working, already tested every way and it does not work.

  16. #16
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    ready. help me
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    I think this problem I reported earlier is because of my region. Brazil. keyboard portuguese brazil abnt2. how to solve?

  18. #18
    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,647

    Re: formula to delete word that contains number

    You need to change all references to A1 to G1.

    Then you need to change all commas to semi-colons ( , to ; ).

  19. #19
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    did not work with any of the 3 formulas presented here.
    Attached Files Attached Files

  20. #20
    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,647

    Re: formula to delete word that contains number

    It's because you have changed things you should not have changed - you need to be more careful.

    Try this:

    =IF(COUNT(SEARCH({0,1,2,3,4,5,6,7,8,9};LEFT(SUBSTITUTE(TRIM(MID(G1;FIND("-";G1)+1;255));" ";REPT(" ";100));100)));LEFT(G1;FIND(" -";G1))&" "&MID(TRIM(MID(G1;FIND("-";G1)+1;255));SEARCH(" ";TRIM(MID(G1;FIND("-";G1)+1;255)))+1;255);G1)

  21. #21
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    worked perfectly. You do not know how grateful I am. I was desperate for this job that I have to do.

    is it possible to extend this formula to answer beyond the first word, to the second and third? only the first three words. lol

    I'm not so good at it.
    Last edited by AliGW; 03-27-2018 at 08:30 AM. Reason: Please don't quote unnecessarily.

  22. #22
    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,647

    Re: formula to delete word that contains number

    I don't think formula solutions are the right way to go if you need to extend this. You should ask for a VBA solution isntead.

    Glad I was able to get this formula working for you.

  23. #23
    Registered User
    Join Date
    02-12-2015
    Location
    Brazil
    MS-Off Ver
    2014
    Posts
    20

    Re: formula to delete word that contains number

    I create another topic or you can transfer this to the correct forum?
    Last edited by AliGW; 03-27-2018 at 08:38 AM. Reason: Unnecessary quotation removed.

  24. #24
    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,647

    Re: formula to delete word that contains number

    I will move it for you now.

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.

+ 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] Formula required to find the nth nearest number to a selected number
    By josephteh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-05-2019, 05:49 PM
  2. [SOLVED] Simple formula/script required: Delete the 2nd Word on each row
    By hateredblast in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-24-2017, 09:05 AM
  3. Replies: 3
    Last Post: 01-24-2017, 08:08 AM
  4. Replies: 5
    Last Post: 12-03-2014, 05:02 PM
  5. [SOLVED] Formula required to return YES/NO if a specified word is present in a cell
    By @MeDaveT in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-17-2014, 04:33 AM
  6. Replies: 3
    Last Post: 01-14-2013, 02:23 PM
  7. Delete A Word That Exceeds X Number Of Characters
    By brazen234 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-31-2005, 12:40 PM

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