Results 1 to 4 of 4

Delete Row if Cell Less Than 1 BUT Keep Blank Cells

Threaded View

InkyDrinky Delete Row if Cell Less Than... 11-13-2016, 11:13 PM
MarvinP Re: Delete Row if Cell Less... 11-13-2016, 11:23 PM
InkyDrinky Re: Delete Row if Cell Less... 11-14-2016, 12:16 AM
Alf Re: Delete Row if Cell Less... 11-14-2016, 02:55 AM
  1. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Delete Row if Cell Less Than 1 BUT Keep Blank Cells

    An alternative method would be to use autofilter. If have a high number of rows it will be a bit faster than looping.

    Sub DelRows()
    ActiveSheet.AutoFilterMode = False
    ActiveSheet.UsedRange.AutoFilter Field:=1, Criteria1:="<1"
    ActiveSheet.AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).EntireRow.Delete
    ActiveSheet.AutoFilterMode = False
    End Sub
    Alf
    Last edited by Alf; 11-14-2016 at 03:37 AM. Reason: Corrected wrong line in macro

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Delete Cells with Specific Value and All Blank Cells Until Next Populated Cell is Checked
    By rdtrahan1906 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2014, 05:50 PM
  2. [SOLVED] Delete special blank cells not recognising blank cells
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-04-2013, 03:54 AM
  3. Replies: 2
    Last Post: 07-25-2013, 01:01 PM
  4. [SOLVED] Delete certain cells if cell is blank
    By jed38 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2013, 02:18 PM
  5. How to delete cells (i.e. make a blank cell) if numbers are negative
    By geomatics in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2012, 11:18 AM
  6. Replies: 1
    Last Post: 05-10-2012, 04:58 PM
  7. [SOLVED] To delete blank rows having blank cell in the needed raws
    By Alexander_Golinsky in forum Excel General
    Replies: 4
    Last Post: 05-04-2012, 03:11 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