LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default locate cell with specific text and select that column

First click on a cell in the row you want searched and then run:

Sub get_col()
s = "happiness"
n = ActiveCell.Row
For i = 1 To Columns.Count
If Cells(n, i).Value = s Then
Cells(n, i).EntireColumn.Select
End If
Next
End Sub

to find happiness.
--
Gary''s Student - gsnu200796
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select specific text in cell John Gregory Excel Discussion (Misc queries) 30 February 17th 08 01:09 AM
Select specific column for auto filter [email protected] Excel Worksheet Functions 4 October 2nd 07 07:26 AM
How do I select cells within a column that contain a specific word Tobias Excel Worksheet Functions 1 September 28th 07 06:50 PM
Locate a specific row or column clara New Users to Excel 2 March 22nd 07 04:45 PM
Select cell containing specific text &return value from another ce plf100 Excel Worksheet Functions 4 November 16th 05 01:57 PM


All times are GMT +1. The time now is 07:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"