Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / October 2008

Tip: Looking for answers? Try searching our database.

How do you Find with data in hidden columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dreiding - 11 Oct 2008 14:49 GMT
In Excel 2003, I use VBA code to find the column with a specific title.  
The Find works well as long as the column is not hidden.  Unfortunately it
has to be hidden and I don't want to hard-code the column address.  
Suggestions welcomed!
Thanks - Pat
Dave Peterson - 11 Oct 2008 14:57 GMT
Turn screenupdating off.
Unhide the columns
do the find
hide the columns
turn screenupdating on

> In Excel 2003, I use VBA code to find the column with a specific title.
> The Find works well as long as the column is not hidden.  Unfortunately it
> has to be hidden and I don't want to hard-code the column address.
> Suggestions welcomed!
> Thanks - Pat

Signature

Dave Peterson

Dave Peterson - 11 Oct 2008 14:59 GMT
Or you could loop through the cells in the header column looking for your key
value.

> In Excel 2003, I use VBA code to find the column with a specific title.
> The Find works well as long as the column is not hidden.  Unfortunately it
> has to be hidden and I don't want to hard-code the column address.
> Suggestions welcomed!
> Thanks - Pat

Signature

Dave Peterson

Dreiding - 11 Oct 2008 16:00 GMT
Well duh.  I should have though of this.

Thanks,
- Pat

> Or you could loop through the cells in the header column looking for your key
> value.
[quoted text clipped - 4 lines]
> > Suggestions welcomed!
> > Thanks - Pat
Don Guillett - 11 Oct 2008 15:07 GMT
Doesn't care if hidden.

Sub findhiddencol()
 MsgBox Rows(1).Find("specific title").Column
End Sub

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> In Excel 2003, I use VBA code to find the column with a specific title.
> The Find works well as long as the column is not hidden.  Unfortunately it
> has to be hidden and I don't want to hard-code the column address.
> Suggestions welcomed!
> Thanks - Pat
Dreiding - 11 Oct 2008 15:58 GMT
Don,

I'm sorry to say, at least for my environment, it does care if the column is
hidden.
I'm using Dave Peterson suggestion of looping through each cell.

- Pat

> Doesn't care if hidden.
>
[quoted text clipped - 7 lines]
> > Suggestions welcomed!
> > Thanks - Pat
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.