Find value in hiden row

P

Patrick C. Simonds

Is there any way to get the code below to find the value NoXXX which is in a
hidden column?

Sub NextRow()
'
' Macro4 Macro
'

'
Cells.Find(What:="NoXXX", After:=ActiveCell, LookIn:=xlValues, LookAt:=
_
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
End Sub
 
J

Joel

You can't activate a hidden cell. Try this

set c = Cells.Find(What:="NoXXX", After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlPart)
 
J

JLGWhiz

First unhide the columns, second, do the search, third, hide the colums
again.

Sub NextRow()
'
' Macro4 Macro
'

'
ActiveSheet.Columns.Hidden = False
Cells.Find(What:="NoXXX", After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

'Put code to re-hide columns here

End Sub
 

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

Top