Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 12-03-2019, 04:12 AM
Danielwhite1 Danielwhite1 is offline Maybe a basic question: How to delete rows with a specific value? Windows 7 32bit Maybe a basic question: How to delete rows with a specific value? Office 2007
Banned
Maybe a basic question: How to delete rows with a specific value?
 
Join Date: Dec 2019
Posts: 1
Danielwhite1 is on a distinguished road
Default 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  
Old 12-03-2019, 04:31 AM
ArviLaanemets ArviLaanemets is offline Maybe a basic question: How to delete rows with a specific value? Windows 8 Maybe a basic question: How to delete rows with a specific value? Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

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  
Old 12-05-2019, 11:43 PM
jolivanes jolivanes is offline Maybe a basic question: How to delete rows with a specific value? Windows 10 Maybe a basic question: How to delete rows with a specific value? Office 2013
Advanced Beginner
 
Join Date: Sep 2011
Posts: 91
jolivanes will become famous soon enough
Default

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
Change references where required.
Closed Thread



Similar Threads
Thread Thread Starter Forum Replies Last Post
Maybe a basic question: How to delete rows with a specific value? 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
Maybe a basic question: How to delete rows with a specific value? Excel VBA macro to copy specific rows and delete it pourmalla Excel Programming 2 04-02-2017 12:09 AM
Maybe a basic question: How to delete rows with a specific value? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft