Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi group
I need a way to check, if StreetAdress_1 is part of StreetAdress_2 Really im comparing 2 adresslists by streetname, but I want to omit the housenumber, which is not all accurate. Any Idea's ? -- Med venlig hilsen Peter Hesselager-Olesen SBS-IT Aps |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is a space between the double quotes, not a null string.
If Left(StreetAddress_1, InStr(StreetAddress_1, " ") - 1) _ = Left(StreetAddress_2, InStr(StreetAddress_2, " ") - 1) Then 'Do something End If I did not test this so there could be errors, but basically use the Left function and the InStr function in tandem to designate the point in the string that you want to evaluate. This would only compare everything up to the first space, so if your street name has more than one word, it might not work so good. "Peter Hesselager" wrote: Hi group I need a way to check, if StreetAdress_1 is part of StreetAdress_2 Really im comparing 2 adresslists by streetname, but I want to omit the housenumber, which is not all accurate. Any Idea's ? -- Med venlig hilsen Peter Hesselager-Olesen SBS-IT Aps |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Peter, disregard that. I had my head backward. The street number comes
first in the U.S. So, it would have to use a Mid Function in tandem with a InStr and Len function to work out the math so that only the street name would be returned. "Peter Hesselager" wrote: Hi group I need a way to check, if StreetAdress_1 is part of StreetAdress_2 Really im comparing 2 adresslists by streetname, but I want to omit the housenumber, which is not all accurate. Any Idea's ? -- Med venlig hilsen Peter Hesselager-Olesen SBS-IT Aps |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I worked the same idea, but some street names have more than one space ( South Street 7 ). To overcome this problem I decided to test if StreetAdress1 (value now being only "South") is part of ( is contained in -) StreetAdress2, which remains unchanged ( South Street 7 ) I know it's not perfect - but the way data are, it will produce only a few "mistakes" When using the ordinary AutoFiltering in excel, you have the possibility to filter for Value "contained in" .... Is there a similar VB-expression to use on this problem ?? -- Med venlig hilsen Peter Hesselager-Olesen SBS-IT Aps "JLGWhiz" skrev: Peter, disregard that. I had my head backward. The street number comes first in the U.S. So, it would have to use a Mid Function in tandem with a InStr and Len function to work out the math so that only the street name would be returned. "Peter Hesselager" wrote: Hi group I need a way to check, if StreetAdress_1 is part of StreetAdress_2 Really im comparing 2 adresslists by streetname, but I want to omit the housenumber, which is not all accurate. Any Idea's ? -- Med venlig hilsen Peter Hesselager-Olesen SBS-IT Aps |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
spreadsheet part and part without grid lines | Excel Discussion (Misc queries) | |||
Search/Match/Find ANY part of string to ANY part of Cell Value | Excel Worksheet Functions | |||
Reduce a range to just be the part within another part? | Excel Programming | |||
Copying Part of a row down part of a column | Excel Discussion (Misc queries) | |||
How can I sperate the module into two part and connecte the two part and work well? | Excel Programming |