Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clarification of the use of Find in VBA

Status
Not open for further replies.

VicM

Programmer
Sep 24, 2001
444
US
Hi,

I need to populate a zipcode column and a county column in my table given only the city and state. I have a table which lists a zipcode column, a County column, a PrimaryCity column and an AcceptableCities column. The PrimaryCity column contains only one city name, and therefore easy to extract the zipcode and county; but the AcceptableCities column can contain one or more comma separated cities/towns, etc., that are associated with a given zipcode and county.

If the city/town I'm looking for is not listed in the PrimaryCity column, I need to search the AcceptableCities column for a match to extract the zipcode and county. I want to know if the Find functionality will find a city/town among the possible multiple listings in the AcceptableCities column.

According to what I've read so far, I need to use the Find and not the Seek functions since the table containing the zipcodes/counties is a linked table to a backend.

Thanks,
Vic
 
Hi,

The Range.Find Method has an argument using xlPart or xlWhole.

Here's the syntax...
Code:
expression . Find( What , After , LookIn , [b]LookAt[/b] , SearchOrder , SearchDirection , MatchCase , MatchByte , SearchFormat )

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Thanks Skip. I'll see if I can incorporate this into my code.

Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top