Hi,
Could you please write the macro which can perform the following function?
If any column in active worksheet is hidden, then the value of cell A1 is “hide”.
Thanks
Hi,
Could you please write the macro which can perform the following function?
If any column in active worksheet is hidden, then the value of cell A1 is “hide”.
Thanks
Are you looking at the entire set of columns or just a bunch of them?
if you're looking at only a bunch of them, you can try:
[VBA]Sub ColumnHidden()
Dim rngColumn As Range
For Each rngColumn In Range("B1:Z1").Columns
If rngColumn.Hidden Then Range("A1").Value = "Column " & rngColumn.EntireColumn.Address(0, 0, 1) & " Hidden"
Next
End Sub
[/VBA]
Hi, uktous,
what about Column A being hidden?
[vba]Sub WriteToA1()
[A1] = IIf(Rows(1).Cells.Count <> Rows(1).SpecialCells(xlCellTypeVisible).Cells.Count, "Hide", "")
End Sub[/vba] Ciao,
Holger