XLA routines: EE_Find

The problem with Excel's "Find" routine is that it does not reset the Find criteria, so that when you use CTRL+F on the worksheet, you have to reset all the params.
EE_Find gets around this by resetting the criteria.
Returns a range object or nothing
Function EE_Find(strFind As String, rngRangeToFindIn As range) As range '- takes a string, RangeToLookIn '- returns a range of the first cell containing the string '- uses .Find method, and looks for exact match, in whole cell '- returns the 'exact match' checkbox back to unchecked 'http://excelexperts.com/xla-routines-eeFind for updates on this function Set EE_Find = rngRangeToFindIn.Find(what:=strFind, LookIn:=xlValues, lookat:=xlWhole) Cells.Find what:="", _ after:=ActiveCell, _ LookIn:=xlFormulas, _ lookat:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False Cells.Replace what:="", Replacement:="", ReplaceFormat:=False End Function
»
- Nick's blog
- Login or register to post comments
- 3251 reads
Recent comments
5 years 50 weeks ago
6 years 36 weeks ago
6 years 47 weeks ago
6 years 50 weeks ago
6 years 51 weeks ago
7 years 5 weeks ago
7 years 13 weeks ago
7 years 13 weeks ago
7 years 13 weeks ago
7 years 13 weeks ago