Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
locate cell with specific text and select that column
I need a macro that will search for a cell with specific text within a row
and then select its appropriate column. Any ideas? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
locate cell with specific text and select that column
On Jul 30, 5:35*pm, rockytopfan4ever
wrote: I need a macro that will search for a cell with specific text within a row and then select its appropriate column. *Any ideas? There are lot of ideas. First one is: why can't you put some serious stuff and do it yourself? U just need to record the steps and then play with the code in the macro as per your needs!! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
locate cell with specific text and select that column
The macro recorder can be your friend. Recorded and cleaned up.
Sub Macro2() ' ' Macro2 Macro ' Macro recorded 7/30/2008 by Donald B. Guillett ' ' Rows("1:1").Select Selection.Find(What:="c", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate End Sub Sub findandselect() Rows(1).Find("c", After:=Cells(1, 1), _ LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext).Activate End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "rockytopfan4ever" wrote in message ... I need a macro that will search for a cell with specific text within a row and then select its appropriate column. Any ideas? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select specific text in cell | Excel Discussion (Misc queries) | |||
Select specific column for auto filter | Excel Worksheet Functions | |||
How do I select cells within a column that contain a specific word | Excel Worksheet Functions | |||
Locate a specific row or column | New Users to Excel | |||
Select cell containing specific text &return value from another ce | Excel Worksheet Functions |