Mutiple page delete macro's

S

shrek

Ive got a work book with 6 sheets of data in it. Ive worked out how t
delete each page indivudally. Im trying to find out how to delete th
data in all 6 sheets at once whilst still keeping the template that al
the data goes into. I use the assign macro using the tools on excel.


Can anyone help or point me in the right direction?

Im new to macro's so if a explination in idiot proof mode would b
greatly appriciated
 
F

FSt1

hi,
I thought this was going to be a snap at i began reading your thread. but
then you mentioned "whilst keeping the template"meaning now the delete must
be done surgically.
one way....
Sub DeleteAllData()
Sheets(Sheet1").select
Range("B5,D5,B7,D7,B9,D9,B11,D11").Clearcontents
Sheets(Sheet2").select
Range("B5,D5,B7,D7,B9,D9,B11,D11").ClearContents
'and so on for each sheet
end sub

the key would be to select all the cells that you want to clear while
leaving the other cells alone.

hope this gets you going in the right direction.
regards
FSt1
 

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

Top