[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
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
Medium Priority
?
25 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 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