G
ghamilton
I have a spreadsheet with 12 columns of numbers preceded by one column
with labels. I want to use the same spreadsheet for each month of
data and just hide the blank columns. Since it is February, I want to
hide the columns for March through December (D through M) since they
will be blank. Next month I only want to hide April through December,
etc.
How can I add a dialog box where I enter the number of the month (in
this case 2) and it hides the rest of the months. Or alternatively,
if I tell it how many columns to hide, it can start at column M and
work backwards.
Thanks,
Columns("D:M").Select
Range("D1").Activate
Selection.EntireColumn.Hidden = True
with labels. I want to use the same spreadsheet for each month of
data and just hide the blank columns. Since it is February, I want to
hide the columns for March through December (D through M) since they
will be blank. Next month I only want to hide April through December,
etc.
How can I add a dialog box where I enter the number of the month (in
this case 2) and it hides the rest of the months. Or alternatively,
if I tell it how many columns to hide, it can start at column M and
work backwards.
Thanks,
Columns("D:M").Select
Range("D1").Activate
Selection.EntireColumn.Hidden = True