SolvedPrivate

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

Posted on 2015-02-23
3
18 Views
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
0
Comment
Question by:Dmitriy Kritskiy
3 Comments
 
LVL 15

Expert Comment

by:gplana
ID: 40626568
I think best way is:

Sheets("Test").Rows("2:65535").Delete
0
 
LVL 10

Accepted Solution

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

Open in new window

0
 

Author Closing Comment

by:Dmitriy Kritskiy
ID: 40626598
Perfect!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

856 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