+ Reply to Thread
Results 1 to 4 of 4

Removing all text from a column of cells

  1. #1
    Registered User
    Join Date
    11-25-2005
    Posts
    51

    Removing all text from a column of cells

    I looked everywhere but could not find a solution to this.

    I have a column that contains numbers and text. Some cells contain just numbers, some just text and some a combination. There is no pattern. Is there a way to remove just the text?

    Here's an example:

    5,000
    4,000cc
    none
    4k credit
    0

  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

    Re: Removing all text from a column of cells

    See if link helps

    http://office.microsoft.com/en-us/ex...549011033.aspx

    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
    11-25-2005
    Posts
    51

    Re: Removing all text from a column of cells

    That works pretty good except for one thing. Many of these cells in the Col contain empty cells so I get a bunch with #NA. Is there a way to combine this with the IF function? (IF cell is blank, then return " ")

    Thanks for the help, I really appreciate it. This site has saved me hours of work.

  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

    Re: Removing all text from a column of cells

    Maybe

    =IF(A1="","",1*MID(A1,MATCH(TRUE,ISNUMBER(1*MID(A1,ROW($1:$9),1)),0),COUNT(1*MID(A1,ROW($1:$9),1))))
    VBA Noob

+ 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