cell B25: "My brother has a farm that grows figs and grapes. He is very wealthy."
Can you use FIND to find these two or more values, assigned to variables, rather than run two separate FINDs? Specifically, x = figs, y = grapes.
within, at the beginning or at the end of any cell text.
This is analogous to using AUTOFILTER with the xlAND operator. AUTOFILTER does work great but it is very slow
over a data set with 30,000+ rows of data. The FIND method seems to execute much faster, but I can only figure out how to make it work for
single value searches at one time. How this code might look: (this doesn't work. Its just an illustration)
The result would be displayed in the userform Textbox3: "figs and grapes found in cell B25"
Here's the userform:
Thanks for anyone's help. I hope this can be done.
cr
Can you use FIND to find these two or more values, assigned to variables, rather than run two separate FINDs? Specifically, x = figs, y = grapes.
within, at the beginning or at the end of any cell text.
This is analogous to using AUTOFILTER with the xlAND operator. AUTOFILTER does work great but it is very slow
over a data set with 30,000+ rows of data. The FIND method seems to execute much faster, but I can only figure out how to make it work for
single value searches at one time. How this code might look: (this doesn't work. Its just an illustration)
Code:
Dim x, y as string
Dim c as range
X = Me.TextBox1.Value ' from a userform input
y = Me.Textbox2.value ' from a userform input
Set c = .FIND(x AND y LookIn:=xlValues, LookAt:=xlPart, MatchCase:=False, SearchFormat:=False)
If Not C Is Nothing Then
'do something
Here's the userform:
Thanks for anyone's help. I hope this can be done.
cr