check if cell is hidden

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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
 
Thank you! That is what I believe I was looking for, only I will use it for
column.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top