Hello,
I am trying the below code to select contents of the Range A2 upto G( end of row) and clear the contents within that range.
The end row number is dynamic for column G and I would like to capture this within my code. Idea is count row number for Column G so that becomes the boundary of my range that starts from A2.
But its not working.
Just can't figure out what is missing in the code.
Thanks
I am trying the below code to select contents of the Range A2 upto G( end of row) and clear the contents within that range.
The end row number is dynamic for column G and I would like to capture this within my code. Idea is count row number for Column G so that becomes the boundary of my range that starts from A2.
But its not working.
VBA Code:
Worksheets("test1").Range("A2",("G" & Rows.Count).End(xlUp)).Select
Selection.ClearContents
Just can't figure out what is missing in the code.
Thanks