ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do you Find with data in hidden columns (https://www.excelbanter.com/excel-programming/418380-how-do-you-find-data-hidden-columns.html)

Dreiding

How do you Find with data in hidden columns
 
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

How do you Find with data in hidden columns
 
Turn screenupdating off.
Unhide the columns
do the find
hide the columns
turn screenupdating on


Dreiding wrote:

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

Dave Peterson

How do you Find with data in hidden columns
 
Or you could loop through the cells in the header column looking for your key
value.

Dreiding wrote:

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

Don Guillett

How do you Find with data in hidden columns
 
Doesn't care if hidden.

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Dreiding" wrote in message
...
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

How do you Find with data in hidden columns
 
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


"Don Guillett" wrote:

Doesn't care if hidden.

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Dreiding" wrote in message
...
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

How do you Find with data in hidden columns
 
Well duh. I should have though of this.

Thanks,
- Pat

"Dave Peterson" wrote:

Or you could loop through the cells in the header column looking for your key
value.

Dreiding wrote:

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



All times are GMT +1. The time now is 10:12 AM.

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