delete rows searching 5 columns - if all zeros in row, delete row macro
I am pretty sure this is not too difficult, but I can't quite figure out how to do it. I have columns D, E, F, G, H that contain numbers in each row. I would like to run a macro that will look at each row and if the above columns listed contain zero, delete
the row. Unknown number of rows in spreadsheet.
002 chicken b 1/1/13 0 0 0 0 0
002 chicken b 1/1/13 1 0 0 0 0
002 chicken b 1/1/13 0 0 0 0 0
002 chicken b 1/1/13 0 1 12 1 0
The above example I would like the macro to delete row 1 and 3 since columns D, E, F, G, and H contact 0
Anwsers to the Problem delete rows searching 5 columns - if all zeros in row, delete row macro
ALT+F11 to open VB editor, right click 'ThisWorkbook' and insert module and paste the code below in and run it with this data sheet as the active sheet.
Dim LastRow As Long, x As Long
LastRow = Cells(Cells.Rows.Count, "D").End(xlUp).Row
For x = LastRow To 1 Step -1
If WorksheetFunction.CountIf(Cells(x, 4).Resize(, 5), 0) = 5 Then
Don't Download Malware
Where are you getting the download?
There are malicious people who download valid copies of a popular download, modify the file with malicious software, and then upload the file with the same name. Make sure you are downloading from the developer's web page or a reputable company.
Cancel or deny any automatic download
Some sites may automatically try start a download or give the appearance that something needs to be installed or updated before the site or video can be seen. Never accept or install anything from any site unless you know what is downloading.
Avoid advertisements on download pages
To help make money and pay for the bandwidth costs of supplying free the software, the final download page may have ads. Watch out for anything that looks like advertisements on the download page. Many advertisers try to trick viewers into clicking an ad with phrases like "Download Now", "Start Download", or "Continue" and that ad may open a separate download.
Recommended Method to Fix the Problem: delete rows searching 5 columns - if all zeros in row, delete row macro:
How to Fix delete rows searching 5 columns - if all zeros in row, delete row macro with SmartPCFixer?
1. Click the button to download SmartPCFixer . Install it on your system. Open it, and it will scan your computer. The junk files will be shown in the scan result.
2. After the scan is finished, you can see the errors and problems need to be repaired. Click Fix All.
3. When the Fixing part is finished, your computer has been speeded up and the errors have been removed
Related: How to Update & Download NVidia GeForce 6100/nForce 420 WHQL Certified driver v.178.13,How to Update & Download NVidia GeForce 7600 GS Video Driver v.295.75 Certified,How Can I Update & Download NVidia GeForce 820M Driver v.344.48 WHQL,[Solved] Download NVidia GeForce GTX 560M VGA Driver v.296.17 Certified,Way to Update & Herunterladen NVidia GeForce GT 130M Video Treiber v.295.75 Certified,How to Update & Download SONY SVE14A1X1RH Realtek Ethernet Driver,Where to Download SONY SVS13A2W9ES Bluetooth Driver (Intel) v.2.6 - 18.104.22.168059,Best Way to Update & Download SONY VGN-CR203E Conexant HDAUDIO SoftV92 Data Fax Modem with SmartCP Setup Program v.22.214.171.124 driver,Best Way to Download SONY VGN-FE790G/N Wireless LAN Driver v.10.6.0.29,Method to Update & Download SONY VGN-NR31Z/S Firmware Extension Parser Device v.126.96.36.199,How to Fix Error 0x0000c1f5 Solución?,Error 0x80071a91 Win7 Fix Patch,Error 0x800ccc60 Windows Live Mail [Solved],Error Message 0x800ccc79 Outlook 2000 Fix,What is Error 0xc1ab0001?,[Answered] x64 saplugin dll,How to Fix Problem - Kb943729 Download?,Troubleshooting: Bccode D1 Error,Java Runtime Tech Support,Troubleshooting: ERROR NO SUCH GROUP Error
Read More: [Anwsered] Delete Combo Box?,Fast Solution to Problem: Date data in CSV file cannot be changed,How Can I Fix - defraging c drive says its consolidating?,Fast Solution to Error: Deletion and expansion of hard drive partition.,[Solved] Delayed process launch of 32-bit process under windows 7 64-bit