View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to find a column

Ron addressed one possibility - here is another:
If you mean sample is text contained in the first row

Dim rng as Range
set rng = rows(1).Find("Sample")
if not rng is nothing then
rng.Entirecolumn.Select
else
msgbox "Sample not found"
End if

--
Regards,
Tom Ogilvy

"Jon Turner" wrote in message
...
In VBA, how would I find a specific column ? I want the function
to return the column number of a column named "Sample"

Many Thanks