#1
|
|||
|
|||
Maybe a basic question: How to delete rows with a specific value?
Hello, Just a quick question since I’ve been given a task involving excel and am still learning. Here is where I am:
I’ve exported an inventory list for a stock transfer very simple, one column of SKU numbers and one of the quantity of each item. However all of the rows that have a quantity of zero need to be removed. I could do this by one by one but I feel like there must be a way to automatically remove them once the sheet has been generated. Is there a way to do this quickly and how? Thanks so much in advance! |
#2
|
|||
|
|||
Set autofilter on and to only 0 quatities to be displayed. Select all displayed records (Full records! Select record markers at left outside of columns area!). Delete records. Set autofilter to 'Select all'.
It's done. |
#3
|
|||
|
|||
Code:
Sub Maybe() With Sheets("Sheet1").Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row) .AutoFilter 1, 0 .Offset(1).SpecialCells(12).EntireRow.Delete End With ActiveSheet.AutoFilterMode = False End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to delete table rows based on the absence of a single specific keyword | JellehFishh | Word VBA | 2 | 06-27-2019 08:23 AM |
How to auto-delete rows that contain specific word? | dylansmith | Excel Programming | 2 | 10-15-2018 12:05 AM |
Excel VBA macro to copy specific rows and delete it | pourmalla | Excel Programming | 2 | 04-02-2017 12:09 AM |
Macro to delete rows not containing specific text | Alimou | Excel Programming | 4 | 02-06-2017 07:35 AM |
A basic question I'm sure. | talosian | PowerPoint | 0 | 04-21-2011 05:43 AM |