Jagwarman
asked on
VBA to clear data from worksheets
I have a file that has over 30 different worksheets. Some of these have data I need to keep but the majority have data that needs to be cleared so that we can start collecting the current data and post on the sheets.
Could an expert provide me with VBA code that will clear data from all the sheets in the workbook except for those that I need to keep. There are currently 6 sheets that I need to keep so we can call them Sheet1, Sheet2 etc etc up to Sheet6
Many thanks
Could an expert provide me with VBA code that will clear data from all the sheets in the workbook except for those that I need to keep. There are currently 6 sheets that I need to keep so we can call them Sheet1, Sheet2 etc etc up to Sheet6
Many thanks
Define "clear"? Do you want to keep headers (and if so, which rows), page setup? Are there formulas already set up?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Phillip
in this case I need to clear the sheets completely headers and all
Regards
in this case I need to clear the sheets completely headers and all
Regards
Then both Rory's and Ivo's solutions both work.
ASKER
As I need to clear so many sheets Rory's is the better solution for me, but thank you all for your input
You could use this macro and call it for each sheet you want
Open in new window
HTHIvo Stoykov