As title shows. Easy to use FIND with one variable value of x, such as x = "apples". What about asking Excel to
use the FIND method to FIND x = "apples" OR "oranges" OR "grapes" if all could be contained in one cell.
cell A5 = "the tree is full of white grapes and it is ready to be picked" FIND = "grapes"
cell A6 = "the basket is full of red grapes and oranges and it is ready to be stored" FIND = "grapes"
requirement to work right: x would have to have multiple values
I tried to make this as simple as possible but complete enough to understand what I need FIND to do.
I would prefer to use FIND than MATCH or anything else.
Thanks for anyone's help. Hopefully this has been done before.
cr
use the FIND method to FIND x = "apples" OR "oranges" OR "grapes" if all could be contained in one cell.
cell A5 = "the tree is full of white grapes and it is ready to be picked" FIND = "grapes"
cell A6 = "the basket is full of red grapes and oranges and it is ready to be stored" FIND = "grapes"
requirement to work right: x would have to have multiple values
Code:
Dim x as string, c as range
Userform1.Textbox1.value = "apples [OR] grapes [OR] oranges"
a button would allow placing the OR operator between each value, telling Excel to FIND any value between the OR Boolean operator
x = Me.TextBox1.Value
Set C = .FIND(X, LookIn:=xlValues, LookAt:=xlPart, MatchCase:=False, SearchFormat:=False)
If Not C Is Nothing Then
do something
I would prefer to use FIND than MATCH or anything else.
Thanks for anyone's help. Hopefully this has been done before.
cr