ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to use find() to search in the selected columns? (https://www.excelbanter.com/excel-programming/345696-how-use-find-search-selected-columns.html)

lvcha.gouqizi

how to use find() to search in the selected columns?
 
how to set the parameters like LookIn, Lookat or any others?


Chip Pearson

how to use find() to search in the selected columns?
 
Try something like the following:

Dim FoundCell As Range
Set FoundCell = Selection.Find(what:="something",
LookIn:=xlValues, _
lookat:=xlWhole, MatchCase:=False)
If FoundCell Is Nothing Then
' not found
Else
' found
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"lvcha.gouqizi" wrote in message
oups.com...
how to set the parameters like LookIn, Lookat or any others?





All times are GMT +1. The time now is 06:41 PM.

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