Macro to Hide columns
Good afternoon,
I am trying to create a macro to hide certain columns on a spreadsheet, how best do i do this, say want to hide columns g, h, u, ac & ae |
Macro to Hide columns
The best way is to record the macro. Turn on the macro recorder, hide your
columns, then stop the recorder. You can then look at the code by pressing alt+F11. Regards, Fred. "whatzzup" wrote in message ... Good afternoon, I am trying to create a macro to hide certain columns on a spreadsheet, how best do i do this, say want to hide columns g, h, u, ac & ae |
Macro to Hide columns
Sub Macro()
Range("G1,H1,U1,AC1,AE1").EntireColumn.Hidden = True 'OR 'Range("G:G,H:H,U:U,AC:AC,AE:AE").Columns.Hidden = True End Sub If this post helps click Yes --------------- Jacob Skaria "whatzzup" wrote: Good afternoon, I am trying to create a macro to hide certain columns on a spreadsheet, how best do i do this, say want to hide columns g, h, u, ac & ae |
Macro to Hide columns
Hi,
Range("G:H, U:U, AC:AC, AE:AE").EntireColumn.Hidden = True Mike "whatzzup" wrote: Good afternoon, I am trying to create a macro to hide certain columns on a spreadsheet, how best do i do this, say want to hide columns g, h, u, ac & ae |
All times are GMT +1. The time now is 03:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com