+ Reply to Thread
Results 1 to 5 of 5

trim text from numbers

  1. #1
    Registered User
    Join Date
    09-18-2009
    Location
    ALABAMA
    MS-Off Ver
    Excel 2007
    Posts
    8

    trim text from numbers

    I have a long column with numbers followed by text and sometimes numbers.
    examples:

    836john
    1245football
    9213lmv3

    I need help in eliminating or trimming all data/numbers after the first number

    I want

    836john to become 836
    1245 football to become 1245
    9213lmv3 to become 9213

    Any help would be greatly appreciated.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: trim text from numbers

    Here, try this (if text is in C5):

    =LOOKUP(99^99, --LEFT(C5, ROW($A$1:$A$20)))

  3. #3
    Registered User
    Join Date
    09-18-2009
    Location
    ALABAMA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: trim text from numbers

    It worked for a cell,but I need to remove it for an entire column (column B for example)
    Last edited by wtcamb; 04-19-2011 at 05:18 PM.

  4. #4
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: trim text from numbers

    This should do the trick..

    Please Login or Register  to view this content.
    Confirm with CTRL+SHIFT+ENTER

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: trim text from numbers

    it worked for a cell,but I need to remove it for an entire column (column B for example)
    drag the formula down the column
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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