ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Somekind of lookup? (https://www.excelbanter.com/excel-programming/400585-somekind-lookup.html)

Adrian

Somekind of lookup?
 
I have a sheet which is a list of clients addresses, and I wish to categorise
each address as being inside or outside a geographical region that I have
defined.
I have a separate sheet with a list of streets within the region.

A typical address would be "11 Cumberland Road"
An entry in the list for the region would be "Cumberland"

What I want to do is write a function that returns True if any of the
entries in the region list appears within the client's address.



Bernie Deitrick

Somekind of lookup?
 
Adrian,

Name the list of allowed street names "List", and use this formula

=IF(SUMPRODUCT(ISNUMBER(FIND(List,E2))*1)=1,"In List","")

Where cell E2 has the address of the client.

Note that it will find Cumberland in Cumberland Road, but will also find Cumberland Street, which
may not be in your area, so be as specific as possible when making up your list.

HTH,
Bernie
MS Excel MVP


"Adrian" wrote in message
...
I have a sheet which is a list of clients addresses, and I wish to categorise
each address as being inside or outside a geographical region that I have
defined.
I have a separate sheet with a list of streets within the region.

A typical address would be "11 Cumberland Road"
An entry in the list for the region would be "Cumberland"

What I want to do is write a function that returns True if any of the
entries in the region list appears within the client's address.





Adrian

Somekind of lookup?
 
Great stuff Bernie! Many thanks.

"Bernie Deitrick" wrote:

Adrian,

Name the list of allowed street names "List", and use this formula

=IF(SUMPRODUCT(ISNUMBER(FIND(List,E2))*1)=1,"In List","")

Where cell E2 has the address of the client.

Note that it will find Cumberland in Cumberland Road, but will also find Cumberland Street, which
may not be in your area, so be as specific as possible when making up your list.

HTH,
Bernie
MS Excel MVP


"Adrian" wrote in message
...
I have a sheet which is a list of clients addresses, and I wish to categorise
each address as being inside or outside a geographical region that I have
defined.
I have a separate sheet with a list of streets within the region.

A typical address would be "11 Cumberland Road"
An entry in the list for the region would be "Cumberland"

What I want to do is write a function that returns True if any of the
entries in the region list appears within the client's address.







All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com