Code to clear contents

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a code to clear all contents of a sheet with the exception of row
"A" .
 
Rows are numbered. Columns are lettered (or numbered??).

with activesheet
'clear all the contents of rows 2:65536
.range("2:" & .rows.count).clearcontents
'clear all the contents of columns B:IV
.range(.columns(2), .columns(.columns.count)).clearcontents
end with
 
My mistake , it is row 1, columns A through K. I need it to be automated
instead of constantly highlighting all rows/columns then hitting delete. I am
new to coding so i need to clear all contents except for criteria row1,col A
through K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top