Closed Thread
Results 1 to 12 of 12

Remove numbers from alphanumeric cells

  1. #1
    Registered User
    Join Date
    09-17-2008
    Location
    OR
    Posts
    11

    Remove numbers from alphanumeric cells

    Hi.

    I have about 10000 cells of varying length in text and numbers but they all end with numbers on the ends of them. Using text to columns doesn't work because they're all different lengths and it cuts them off in the wrong place.

    Is there a formula I can use that will return only the text from these cells and remove the numbers. It would definitely save me time from individually deleting the numbers at the end.

    Thanks so much!!
    Last edited by amdaln; 09-17-2008 at 06:03 PM. Reason: RESOLVED.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Is there a pattern to the numbers at the end.

    Maybe you can post a few sample's

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    09-17-2008
    Location
    OR
    Posts
    11
    EXAMPLE:

    BARNEY & LARKIN CONSTRUCTION 1003
    BARNEY & LARKIN CONSTRUCTION 1008
    BARNEY & LARKIN CONSTRUCTION 1015
    BARNEY & LARKIN CONSTRUCTION 993
    BARNEY & LARKIN CONSTRUCTION 997
    BRICES CATERING SERVICE 51072
    BRICES CATERING SERVICE 60023
    BRICES CATERING SERVICE 65237
    BRICES CATERING SERVICE 78
    C&D LANDSCAPE CO 15597
    C&D LANDSCAPE CO 15825
    CALIFORNIA BLACK CHAMBER COMM. APR/JUN-06
    CANBY LANDSCAPE 1005
    CANBY LANDSCAPE 1023
    CANBY LANDSCAPE 1047
    CANBY LANDSCAPE 1078
    CANBY LANDSCAPE 154
    CANBY LANDSCAPE 174
    CANBY LANDSCAPE 182
    CAP INDEX, INC 227090
    CAPITAL SHEET METAL INC 32020
    CAPITAL SHEET METAL INC 32021
    CAPITAL SHEET METAL INC 32120
    CAPITAL SHEET METAL INC 32121
    CAPITAL SHEET METAL INC 32185
    CAPITAL SHEET METAL INC 32326
    CAPITAL SHEET METAL INC 32360
    CAPITAL SHEET METAL INC 33113
    CAPITAL SHEET METAL INC 34711
    CAPITOL CITY DOOR INC 18177
    CAPITOL CITY DOOR INC 59452
    CAPITOL CITY DOOR INC R16361
    CAPITOL CITY DOOR INC R16457
    CAPITOL CITY DOOR INC T17647
    CAPITOL CITY DOOR INC T18346
    CAPITOL CITY DOOR INC T18446
    CAPITOL CITY DOOR INC T18460
    CAPITOL CITY DOOR INC T18496
    CAPITOL CITY DOOR INC T18532
    CAPITOL CITY DOOR INC T18620
    CAPITOL CITY GLASS CO, INC 59452
    CAPTURE TECHNOLOGIES INC. 30001524
    CARPET ETC 45968
    CARREKER CORPORATION 015509
    CARREKER CORPORATION 13148
    CARREKER CORPORATION 13320
    CARREKER CORPORATION 13321
    CARREKER CORPORATION 13588
    CARREKER CORPORATION 14203
    CARREKER CORPORATION 14663
    CARREKER CORPORATION 14943
    CARREKER CORPORATION 15093


    See. It goes on and on and I only need the business name minus the invoice numbers. But It would take forever to individually edit these, even if I delete the numbers from one and drag down. I'd rather just remove the numbers quickly.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =LEFT(A1,FIND("^^",SUBSTITUTE(" "&A1," ","^^",LEN(" "&A1)-LEN(SUBSTITUTE(" "&A1," ",""))))-1)
    VBA Noob

  5. #5
    Registered User
    Join Date
    09-17-2008
    Location
    OR
    Posts
    11
    Genius!! Thanks so much. I wish I understood what it all meant. Would it be too much to ask what the breakdown is?

    Amber

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Search excel help on the functions.
    Link may help also

    http://www.mvps.org/dmcritchie/excel/strings.htm


    VBA Noob

  7. #7
    Registered User
    Join Date
    09-17-2008
    Location
    OR
    Posts
    11
    Thanks so much for the help.


  8. #8
    Registered User
    Join Date
    09-17-2008
    Location
    OR
    Posts
    11
    Okay, I have another question about this same thing.

    Here are the cells originally --

    APPROVED BY C SOULE WASHINGTON CO SHERIFF`S OFFICE 1827H
    APPROVED BY C SOULE WASHINGTON COUNTY SHERIFF`S 1827H
    APPROVED BY D BATES AMTECH LIGHTING SERVICES 183304857
    APPROVED BY D BATES AMTECH LIGHTING SERVICES 183408756
    APPROVED BY D BATES ANIXTER INC 135421278
    APPROVED BY D BATES ANIXTER INC 135421337
    APPROVED BY D BATES B&C TELEPHONE INC 106151
    APPROVED BY D BATES B&C TELEPHONE INC 110069
    APPROVED BY D BATES B&D ELECTRONIC SALES MOVED FROM CIP TO EXPENSE (CC)
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 25924
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 35529
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 35662
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 35705
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 35705
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 35753
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 35765
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 36205
    APPROVED BY D BATES B&D ELECTRONIC SALES, INC. 36341

    I have the forumla to remove the numbers (thank you very much VBA Noob) Is there one I can add on to remove the first 4 separate words? Approved by Blank Blank?

    It would be super helpful.

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    IF your strings always start with "Approved by ? " where ? represents the initial only of the first name (and there's never anyone with a middle initial), then this simple one will work
    Please Login or Register  to view this content.
    15 would work, I chose 16 to be on the safe side.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  10. #10
    Registered User
    Join Date
    09-17-2008
    Location
    OR
    Posts
    11
    The forumla you gave me removes the vendor name, not the APPROVED BY NAME.

    I'm trying to change the cells to just be the Vendor name.

    Thanks though!!

  11. #11
    Registered User
    Join Date
    08-19-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Remove numbers from alphanumeric cells

    “=LEFT(A1,FIND("^^",SUBSTITUTE(" "&A1," ","^^",LEN(" "&A1)-LEN(SUBSTITUTE(" "&A1," ",""))))-1)”

    I modified the above formula from Left to Right in order to drop the numbers off the front of some data but the result are not what I expected.

    Data Example
    123 Alpha Rd
    11223 Alpha Trl
    123 Bravo Rd
    1124 Alpha Rd

    Formula generated Values:
    3 Alpha Rd
    23 Alpha Trl
    3 Bravo Rd
    24 Alpha Rd

    Any help would be greatly appreciated.

    Thanks,

  12. #12
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Remove numbers from alphanumeric cells

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sum a range of cells containing numbers with letters concatenated
    By KernelK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-22-2008, 06:18 AM
  2. Can you draw lines through the center of cells, using cell numbers as references?
    By iterature in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2007, 06:06 AM
  3. Question regarding sorting a column of alphanumeric cells
    By dubvision357 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2007, 01:41 AM
  4. Create column of tracking numbers from cells
    By wallyb in forum Excel General
    Replies: 2
    Last Post: 03-16-2007, 05:58 PM
  5. Remove numbers from Absolute Reference
    By Duncan1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2007, 03:57 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