VBA: Best way to clear contents for multiple columns starting with 2nd row, and all the way down

Posted on 2015-02-23
Last Modified: 2016-02-10
What's the most efficient way to write the code to clear contents for multiple columns, let's say A through D, starting with 2nd row, and all the way down? Thanks
Question by:Dmitriy Kritskiy
LVL 15

Expert Comment

ID: 40626568
I think best way is:

LVL 10

Accepted Solution

Anthony Berenguel earned 500 total points
ID: 40626574
    Application.Goto Reference:="R2C1:R2C4" 'where R is row and C is column. 
    Range(Selection, Selection.End(xlDown)).Select

Open in new window


Author Closing Comment

by:Dmitriy Kritskiy
ID: 40626598

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now