+ Reply to Thread
Results 1 to 6 of 6

Remove everything in a Cell to the right of the first number, including that num

  1. #1
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Unhappy Remove everything in a Cell to the right of the first number, including that num

    I'm trying to figure out how to Remove all characters in a column, starting from, and including, the first number in the cell.

    Example:

    Column range B2:B101, find first number in each cell, delete everything to the right in that cell, including that number.

    I've tried a couple ways to do this but I can't figure it out.

    Can anyone help?

    Thanks,
    Trevor

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,027

    Re: Remove everything in a Cell to the right of the first number, including that num

    Are you able to post some sample data, so that we can see what the information looks like.



    Edit: Look at this post from earlier today
    http://www.excelforum.com/excel-form...-sequence.html
    Last edited by alansidman; 12-03-2012 at 05:29 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Remove everything in a Cell to the right of the first number, including that num

    Of course, why didn't I think of that. Thanks for the advice. Example:

    A
    Symbol
    A2 GC2Z
    A3 GC3G
    A4 GC4F
    A5 AGC5Y
    A6 BBC8W

    The Desired Outcome would be:

    A
    Symbol
    A2 GC
    A3 GC
    A4 GC
    A5 AGC
    A6 BBC

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: Remove everything in a Cell to the right of the first number, including that num

    try this monster, copied down...
    =LEFT(A1,SEARCH(LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW($1:$10000)))),A1,1)-1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Talking Re: Remove everything in a Cell to the right of the first number, including that num

    Wow, that works great. Thanks so much.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: Remove everything in a Cell to the right of the first number, including that num

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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