ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I need to find (https://www.excelbanter.com/excel-programming/314213-i-need-find.html)

cdde

I need to find
 

I need help using code that would search column A for value and the
choose the entire row that its in. If anyone can help. Than

--
cdd
-----------------------------------------------------------------------
cdde's Profile: http://www.excelforum.com/member.php...fo&userid=1553
View this thread: http://www.excelforum.com/showthread.php?threadid=27104


Dave Peterson[_3_]

I need to find
 
How about:

Option Explicit
Sub testme()

Dim FoundCell As Range

With ActiveSheet.Range("a:a")
Set FoundCell = .Find(what:="whatever", _
after:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)
End With

If FoundCell Is Nothing Then
MsgBox "not found"
Else
FoundCell.EntireRow.Select
End If

End Sub



cdde wrote:

I need help using code that would search column A for value and then
choose the entire row that its in. If anyone can help. Thanx

--
cdde
------------------------------------------------------------------------
cdde's Profile: http://www.excelforum.com/member.php...o&userid=15532
View this thread: http://www.excelforum.com/showthread...hreadid=271040


--

Dave Peterson



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

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