+ Reply to Thread
Results 1 to 2 of 2

needing macro to delete cells that only contain text

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    Portland, Oregon
    MS-Off Ver
    Excel 2007
    Posts
    16

    needing macro to delete cells that only contain text

    I have attempted to find answers through other boards/forums and although I am close, there is nothing directly pertaining to what I am after. I have a extensive list of auto parts that I need to trim down to the part number only. The list unfortunately contains the make, model, and plenty of other useless information as well. To make things even more difficult some of the part numbers contain letters as well. I had found some VBA code that will automatically remove all alpha characters, but it applies itself to all cells. To start I did a text to columns with a delimiter on spaces so that each grouping would have it's own separate cell. The VBA code used is as follows

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. Also next time please consider using indentation to show program structure, as shown. --6StringJazzer

    Please Login or Register  to view this content.
    My theory is that I should be able to have a IF statement that precedes the code basically saying if the cell contains a number skip it else run the code, but this is where my programming skill starts lacking.

    Also I have included a small sample of the file I am trying to edit.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 02-20-2014 at 06:33 PM. Reason: code tags

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: needing macro to delete cells that only contain text

    Try:

    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

+ 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. Help with macro to delete text and leave time in all desired cells
    By ncguy131 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2013, 01:23 PM
  2. Macro that can delete partial text from a range of cells
    By barkerw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2011, 12:19 PM
  3. macro Delete string text between brackets in several cells
    By raparigo74 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-27-2011, 04:19 AM
  4. Excel 2007 circle cells needing text entry, Possible?
    By teko1995 in forum Excel General
    Replies: 3
    Last Post: 06-07-2009, 07:36 AM
  5. Need macro to delete all text cells in an Excel range
    By GVT in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2006, 08:30 AM

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