Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FIND function for an array FARAZ QURESHI Excel Discussion (Misc queries) 3 January 26th 07 04:21 AM
Variable Table Array in Lookup Function matt_the_brum Excel Worksheet Functions 6 August 4th 06 05:07 PM
Using Array variable in FIND function JMB Excel Programming 1 November 1st 05 03:59 PM
How to find out the size of a variable-size array ? Adrian[_7_] Excel Programming 1 July 6th 04 09:12 AM
Find size of array passed to user-defined function Cliff[_2_] Excel Programming 2 October 21st 03 02:09 AM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"