How to hide the columns in excel sheet based on column name condition -
I have an Excel workbook where I have multiple sheets. I would like to hide some columns in all the sheets where the header is a string < Code> "AUDIT _" .
I am trying to find a simple solution to hide these columns, all the sheets so that I do not want to go and hide every sheet.
Would you please give me a suggestion on this.
Try this one:
sub column header () DimS As long as the worksheet, for longer time, for each S in worksheets. En = cell (1, column number) activate. End (XLTOLET) If the column for I = 1 to N is left (cell (1, i). Value, 6) = "AUDIT_" then cells (1, i) EntireColumn.Hidden = True End if Next I Next sub-term
< / Pre>
Comments
Post a Comment