ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   check if cell is hidden (https://www.excelbanter.com/excel-programming/313424-check-if-cell-hidden.html)

Wandering Mage[_2_]

check if cell is hidden
 
I am in a for loop and want to do this
For Each Cell In Target
If (the current cell in this for loop is hidden) Then
true part
Else
not tru part
End If
Next
how do I write (the current cell in this for loop is hidden) conditional. I
want to find out if Cell, or Cell.Column is hidden, either one will work. As
always thank you in advance for the help, it is appreciated!

Ron de Bruin

check if cell is hidden
 
Try this

Sub test()
Dim cell As Range
For Each cell In Range("A1:A10")
If cell.EntireRow.Hidden = True Then
MsgBox "Hidden"
Else
MsgBox "not Hidden"
End If
Next
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Wandering Mage" <Wandering wrote in message
...
I am in a for loop and want to do this
For Each Cell In Target
If (the current cell in this for loop is hidden) Then
true part
Else
not tru part
End If
Next
how do I write (the current cell in this for loop is hidden) conditional. I
want to find out if Cell, or Cell.Column is hidden, either one will work. As
always thank you in advance for the help, it is appreciated!




Wandering Mage[_3_]

check if cell is hidden
 
Thank you! That is what I believe I was looking for, only I will use it for
column.

"Ron de Bruin" wrote:

Try this

Sub test()
Dim cell As Range
For Each cell In Range("A1:A10")
If cell.EntireRow.Hidden = True Then
MsgBox "Hidden"
Else
MsgBox "not Hidden"
End If
Next
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Wandering Mage" <Wandering wrote in message
...
I am in a for loop and want to do this
For Each Cell In Target
If (the current cell in this for loop is hidden) Then
true part
Else
not tru part
End If
Next
how do I write (the current cell in this for loop is hidden) conditional. I
want to find out if Cell, or Cell.Column is hidden, either one will work. As
always thank you in advance for the help, it is appreciated!






All times are GMT +1. The time now is 02:13 AM.

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