Sep 16 2021 06:07 PM
Sub junk()
'
' junk Macro
'
' Keyboard Shortcut: Ctrl+j
'
Columns("C:D").Select
Selection.EntireColumn.Hidden = True
Columns("F:G").Select
Selection.EntireColumn.Hidden = True
End Sub
This macro hides columns B-K instead of hiding C-D and F-G. I don't understand at all. Can someone help? Thanks!!!!!
Sep 17 2021 01:05 AM
Unless some columns were already hidden, that shouldn't happen. This is the result when I run your macro:
By the way, you can shorten the macro to
Sub junk()
'
' junk Macro
'
' Keyboard Shortcut: Ctrl+j
'
Range("C1:D1,F1:G1").EntireColumn.Hidden = True
End Sub
Not selecting the ranges that you want to manipulate is more efficient.