Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2020, 10:55 AM
DIMI DIMI is offline Clear rows with vba Windows 7 32bit Clear rows with vba Office 2007
Advanced Beginner
Clear rows with vba
 
Join Date: Aug 2017
Posts: 37
DIMI is on a distinguished road
Default Clear rows with vba

Hello,
I want a macro to clear all contents from the rows if the column A the number is zero.
Thanks
Attached Files
File Type: xlsx example.xlsx (9.7 KB, 7 views)
Reply With Quote
  #2  
Old 01-29-2020, 07:32 PM
BobBridges's Avatar
BobBridges BobBridges is offline Clear rows with vba Windows 7 64bit Clear rows with vba Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

That's easy, DIMI:
Code:
' ows is your worksheet object
' vr is the row you're examining
If ows.Cells(vr, 1).Value = 0 then ows.Rows(vr).ClearContents
Reply With Quote
  #3  
Old 01-29-2020, 10:21 PM
DIMI DIMI is offline Clear rows with vba Windows 7 32bit Clear rows with vba Office 2007
Advanced Beginner
Clear rows with vba
 
Join Date: Aug 2017
Posts: 37
DIMI is on a distinguished road
Default

Thaks,but i don't know to write the code,could you write for me. Finally if i have zero in the second and forth row then the third i want to go up because would not space between from the rows.
Thanks
Reply With Quote
  #4  
Old 01-30-2020, 09:22 AM
BobBridges's Avatar
BobBridges BobBridges is offline Clear rows with vba Windows 7 64bit Clear rows with vba Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

No, but if you're willing to take the time I'll teach you how. Then you'll be able to write your own macros any time you need one!


I've a Gmail account, robhbridges; contact me there and I'll get you started.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear browser history Venom286 Outlook 0 04-08-2019 11:17 PM
clear offline items supertech Outlook 0 09-02-2015 01:46 AM
Clear old RSS Feeds eltonlaw Outlook 0 08-16-2012 07:32 PM
Clear rows with vba Clear document Jaymond Flurrie Word VBA 5 07-17-2011 05:07 PM
Holidays--clear all? markg2 Outlook 0 11-01-2009 05:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:27 AM.


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