I have some code where I want to clear subtotals and
clear the contents from three tabs.
My code looks like this:
sheets("first").select
cells.select
selection.removesubtotal
selection.clearcontents
sheets("second").select
cells.select
selection.removesubtotal
selection.clearcontents
etc. etc.
How do I remove subtotals from all three tabs at the same time,
and how do I combine the lines of code to the least amount
of lines?
Dim i As Integer
For i = 1 To 3
With Sheets(i).Cells
.RemoveSubtotal
.ClearContents
End With
Next i