B
Books4Sale
Is there a way to delete the same columns (A & B) in every worksheet in the
workbook?
Thanks,
John
workbook?
Thanks,
John
Domenic said:Hi Julie,
How can you change that to have columns 10 to 20 deleted for every
worksheet?
Thanks!
Gord Dibben said:John
Select first sheet then right-click on sheet tab and "select all sheets" to
group the sheets.
Delete columns A and B on active sheet. All sheets will have A and B deleted.
DO NOT FORGET to right-click and "ungroup sheets" when finished.
What you do to one gets done to all in the "group"
Gord Dibben Excel MVP
JulieD said:columns or rows?
Dave Peterson <[email protected]> said:Try that first one again against a test workbook. I'd be very surprised if
there was a difference between the windows version and the mac version.
I tried it again and got the same results. With sample data entered
from Column A to Column Z, I got the following results:
Range("a1:c1,m1:q1") ---> Column S to Column Z deleted
Range("a1:c1") ---> Columns X, Y, and Z deleted
Range("a1") ---> Column Z deleted
Very strange indeed!
Dave Peterson <[email protected]> said:Can you post all of your code?
Dave Peterson <[email protected]> said:And this worked differently in the Mac version?
Maybe one more test???
Option Explicit
Sub deletecols()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
sh.Activate
sh.Range("a1:c1,m1:q1").EntireColumn.Select
Next
End Sub
I just can't believe that something this plain works differently on a mac.
That sounds scary to me.