+ Reply to Thread
Results 1 to 4 of 4

Remove rows containing a number

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    46

    Remove rows containing a number

    Hi,

    I need some help with something that I think can only be solved with VBA. I have some data which can be of varying sizes in 3 columns. I need to look through the data and delete all rows where neither of the 3 columns contain just numbers. The blank rows rows would need to be removed as well. I've attached an Excel sheet with an example. Any help would be greatly appreciated.

    Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Remove rows containing a number

    It doesn't require VBA, but a simple =IF function can identify which rows to delete. Then you can simply filter and delete those rows.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Remove rows containing a number

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Remove rows containing a number

    Hi, james19,

    without any macro you could use the WorksheetFunctions Count and CountBlank in two helper columns, use Autofilter, delete the lines which meet the criteria (maybe restrict to the visible cells depending on the verison of Excel being used like XL9 and XL8, from 2002/XP deletion should work for only visible cells), Unfilter.

    Code may look like this (will not detect Numbers which are displayed as Text):
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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. How to remove rows that contain a number/word in the cell
    By jake.rourke in forum Excel General
    Replies: 2
    Last Post: 09-04-2014, 04:36 AM
  2. Problem using Autofilter to remove large number of rows of data
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 63
    Last Post: 07-30-2013, 07:32 AM
  3. Replies: 6
    Last Post: 09-26-2012, 05:40 AM
  4. remove 0 number from rows
    By pejoi in forum Excel General
    Replies: 2
    Last Post: 09-17-2012, 06:03 AM
  5. How to remove ALL rows that DO NOT have a match for certain word or number
    By davebryan in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2011, 07:24 PM

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