View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Prasad Vanka Prasad Vanka is offline
external usenet poster
 
Posts: 28
Default Use data from an external sheet.

Hi,

I am developing an application using Ms Excel 2002. I have a countries
worksheet which holds all the valid countries in one column. This
worksheet is part of my main workbook. The only purpose of this
worksheet is for validating input records that contain a country name.
So whenever I read an input record then I activate this sheet and
check whether the country is valid as follows:
If Not Worksheets(strCountriesWorksheet).Range("a:a").Fin d(strCountry,
LookIn:=xlValues) Is Nothing Then
IsValidCountry = True
End If

I want to know whether there is any better method. Can I load all the
countries from this sheet into some array (or any thing else) and
later use that to search for the country. If so can someone give me
some example code how to use array (or any thing else) for
searching/lookup.

Thanks in advance
Prasad Vanka