Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Array variable in FIND function
You could also define your array like this.
Dim SearchIn As Variant SearchIn = Array("*employment *government","*employment *manufacturing") "GreenInIowa" wrote: I am using the following code to FIND "employment " and "government" and the code is working fine. Set rngia = Cells(i, 1).Find(What:="*employment *government", LookIn:=xlValues, Lookat:=xlPart) But I have others searches to do and thus, would like to use an array variable for "What:=". Is this possible? I tried to define "SearchIn" as array variable and used in FIND function, but it is giving me error. I was wondering why? Dim SearchIn As Range SearchIn(1) = "*employment *government" SearchIn(2) = "*employment *manufacturing" Set rngia = Cells(i, 1).Find(What:=SearchIn(n), LookIn:=xlValues, Lookat:=xlPart) Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FIND function for an array | Excel Discussion (Misc queries) | |||
Variable Table Array in Lookup Function | Excel Worksheet Functions | |||
Using Array variable in FIND function | Excel Programming | |||
How to find out the size of a variable-size array ? | Excel Programming | |||
Find size of array passed to user-defined function | Excel Programming |