ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheet.columns("K:M").EntireColumn.Hidden = True (https://www.excelbanter.com/excel-programming/289772-sheet-columns-k-m-entirecolumn-hidden-%3D-true.html)

Kevin McCartney[_2_]

sheet.columns("K:M").EntireColumn.Hidden = True
 
Hi
I need to know how I can do the following 'Columns("K:M").EntireColumn.Hidden = True' but where the column is a character I need to have the corresponding number e.g. K is the 11th column and M is 13th so something like 'Columns("11:13").EntireColumn.Hidden = True

any help much appritiate

regard
K


Frank Kabel

sheet.columns("K:M").EntireColumn.Hidden = True
 
Hi Kevin
one way:
range(Columns(11),columns(13)).entirecolumn.hidden = TRUE

HTH
Frank
Kevin McCartney wrote:
Hi,
I need to know how I can do the following
'Columns("K:M").EntireColumn.Hidden = True' but where the column is a
character I need to have the corresponding number e.g. K is the 11th
column and M is 13th so something like
'Columns("11:13").EntireColumn.Hidden = True'

any help much appritiated

regards
KM





All times are GMT +1. The time now is 05:40 AM.

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