?
Solved

Count to last row and delete

Posted on 2012-04-13
2
Medium Priority
?
214 Views
Last Modified: 2012-04-13
Hi,

On entering a WB i am counting the number of rows in ColA

 lngRow = Cells(Rows.Count, "A").End(xlUp).Row

I now want to clear contents from "A2:M2" down to the last row.

What line of code would i use for this?

Thanks
Seamus
0
Comment
Question by:Seamus2626
[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
2 Comments
 
LVL 10

Accepted Solution

by:
gavsmith earned 2000 total points
ID: 37841718
Range("A2:M" & lngRow).ClearContents
0
 

Author Closing Comment

by:Seamus2626
ID: 37841778
Excellent,

Thanks
Gav
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

752 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