• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Count to last row and delete

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
Seamus2626
Asked:
Seamus2626
1 Solution
 
gavsmithCommented:
Range("A2:M" & lngRow).ClearContents
0
 
Seamus2626Author Commented:
Excellent,

Thanks
Gav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now