ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sh.Cells.Find() (https://www.excelbanter.com/excel-programming/390660-sh-cells-find.html)

Dan R.

sh.Cells.Find()
 
I'm using the following to search for values in multiple worksheets.
Is there a way to specify which column it looks in to speed up the
code a bit?


For Each sh In bk.Worksheets
For Each i In iRng
Set rng = sh.Cells.Find( _
What:=i.Value, _
LookIn:=xlValues, _
Lookat:=xlWhole, _
MatchCase:=False)


' Do Stuff

Next i
Next sh


Thanks,
-- Dan


excelent

sh.Cells.Find()
 
Set rng = sh.Range("A1:A10000").Find(i.Value, LookIn:=xlValues)

"Dan R." skrev:

I'm using the following to search for values in multiple worksheets.
Is there a way to specify which column it looks in to speed up the
code a bit?


For Each sh In bk.Worksheets
For Each i In iRng
Set rng = sh.Cells.Find( _
What:=i.Value, _
LookIn:=xlValues, _
Lookat:=xlWhole, _
MatchCase:=False)


' Do Stuff

Next i
Next sh


Thanks,
-- Dan




All times are GMT +1. The time now is 08:26 AM.

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