ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to hide or unhide columns (https://www.excelbanter.com/excel-programming/323115-macro-hide-unhide-columns.html)

Chance224

Macro to hide or unhide columns
 
I have 12 columns for each month with various totals listed in rows. Between
each month I have columns for each day on the month. Those columns are
hidden for reporting and visual purposes. The monthly columns total of off
of the daily ones. Is there a way to create a macro that would work using a
short cut such as €œCtrl+1€ for January €œCtrl+2€ for February and so on that
would either hide the specified columns or unhide them.

Thanks,
Chance


Fredrik Wahlgren

Macro to hide or unhide columns
 

"Chance224" wrote in message
...
I have 12 columns for each month with various totals listed in rows.

Between
each month I have columns for each day on the month. Those columns are
hidden for reporting and visual purposes. The monthly columns total of

off
of the daily ones. Is there a way to create a macro that would work using

a
short cut such as ?oCtrl+1? for January ?oCtrl+2? for February and

so on that
would either hide the specified columns or unhide them.

Thanks,
Chance


You can easily record a macro that hides or unhides a column. I'm not sure
whethere it's a good idea to use a shortcut for each possible combination,
what would you use for November? Wouldn't it be better to basse the logic on
the current month or a value in a cell?

/Fredrik




All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com