Recognizing street in which part, area, region city belongs ?

tasic89

New Member
Joined
Apr 12, 2021
Messages
35
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
I would like to do next.

City have streets, lets say 500 streets, unique names, phrases.

City also have "areas", its parts, its' like 10 parts, areas, regions. In 1st part there is like 80 streets, in 2nd part is like 40, in 3rd 100...

There are also some streets that are longer and than 1st fragment of that street up to number 100 is in 1st part of city area, and from number 101 is in 2nd part of city.

I can do that manually, but... IS there any chance for excel to do it (recognize) automatically ?

First sheet is a model where there are "rules" for recognizing which street is in which part, area, region of city it is.

problem.xlsx
BCD
3StreetsStreet numbersRegion
4
5San Fernando Road1-100HOLLYWOOD
6San Fernando Road101-200SANTA MONICA
7San Pedro StreetHOLLYWOOD
8San Vicente BoulevardHOLLYWOOD
9San Vicente BoulevardHOLLYWOOD
10Santa Monica BoulevardHOLLYWOOD
11Santee AlleyHOLLYWOOD
12Sawtelle BoulevardHOLLYWOOD
13Sepulveda BoulevardHOLLYWOOD
14Sunland BoulevardWEST HOLLYWOOD
15Sunset BoulevardWEST HOLLYWOOD
16Balboa BoulevardWEST HOLLYWOOD
17Beverly BoulevardWEST HOLLYWOOD
18Beverly DriveWEST HOLLYWOOD
19Beverly Glen BoulevardWEST HOLLYWOOD
20BroadwaySANTA MONICA
21Broadway TunnelSANTA MONICA
22Cahuenga BoulevardSANTA MONICA
23Centinela AvenueSANTA MONICA
24Central Avenue1-150SANTA MONICA
25Central Avenue151-300WEST HOLLYWOOD
26Century BoulevardSANTA MONICA
27Cesar Chavez AvenueSANTA MONICA
28Coldwater Canyon AvenuePASADENA
29Colorado BoulevardPASADENA
30Crenshaw BoulevardPASADENA
streets region


This are models of sheet/table where I usually enter in which part of city they live. One of examples is with a street that "splits" in 2 regions, maybe it can even split in more regions, but...

problem.xlsx
BCDEFGHIJKL
2
3
4NameSurnameStreetAreaCity
5MikeJonhsSan Pedro Street 10HOLLYWOODLA
6PeterStrikeBeverly Drive 11WEST HOLLYWOODLA
7MariaAlsonCentral Avenue 3SANTA MONICALA
8StevenLamarsCentral Avenue 202WEST HOLLYWOODLA
9CourtneyOlsenCrenshaw Boulevard 40PASADENALA
10
11
12
13NameSurnameStreetColumn1AreaCity
14MikeJonhsSan Pedro Street10HOLLYWOODLA
15PeterStrikeBeverly Drive 11WEST HOLLYWOODLA
16MariaAlsonCentral Avenue 3SANTA MONICALA
17StevenLamarsCentral Avenue 202WEST HOLLYWOODLA
18CourtneyOlsenCrenshaw Boulevard 40PASADENALA
19
20
21
22
23
24
25
26
27
people
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I don't understand what you are looking for as a result and where?
 
Upvote 0
Well, sheet 2 with yellow color.

There I was entering manually where people live, in which area (something I need, but I don't have in documents I am getting).

Yellow are where I want.

I want that excel somehow recognize automatically that " Central Avenue 202 " is in "WEST HOLLYWOOD ", that "Crenshaw Boulevard 40 " is in "PASADENA " ...

1st sheet is list of streets in certain region
 
Upvote 0
I created 2 help columns (fill these down):

Book6
ABCDE
5San Fernando Road1-100HOLLYWOOD1100
6San Fernando Road101-200SANTA MONICA101200
Streets
Cell Formulas
RangeFormula
D5:D6D5=IF(ISBLANK(B5),"",1*LEFT(B5,FIND("-",B5)-1))
E5:E6E5=IF(ISBLANK(B5),"",1*(RIGHT(B5,LEN(B5)-FIND("-",B5))))


Then,

Book6
ABCDEFG
1NameSurnameStreetColumn1AreaCity
2MikeJonhsSan Pedro Street10HOLLYWOODLA
3PeterStrikeBeverly Drive11WEST HOLLYWOODLA
4MariaAlsonCentral Avenue3SANTA MONICALA
5StevenLamarsCentral Avenue202WEST HOLLYWOODLA
6CourtneyOlsenCrenshaw Boulevard40PASADENALA
Report
Cell Formulas
RangeFormula
F2:F6F2=IF(0=VLOOKUP(D2,Streets!$A$5:$C$30,2,FALSE),VLOOKUP(D2,Streets!$A$5:$C$30,3,FALSE),INDEX(Streets!$C$5:$C$30,MAX((ROW($1:$26)*(E2>=Streets!$D$5:$D$30)*(D2=Streets!$A$5:$A$30)))))


Might not be the most elegant or easiest, but was my first shot at it.
 
Upvote 0
Solution
Hi

I made your formula work, and your whole two sheets work.

I can make changes to my current streets in "Streets" sheet , and it will work.

My problem now is - I want to add new streets, with new street numbers rules (like Balboa Street 1-50, Balboa Street 51-100, Balboa Street 101-300, or just new street without numbers)

What should I do ? I tried changing manually your formula from

Excel Formula:
=IF(0=VLOOKUP(D4,Streets!$A$5:$C$30,2,FALSE),VLOOKUP(D4,Streets!$A$5:$C$30,3,FALSE),INDEX(Streets!$C$5:$C$30,MAX((ROW($1:$26)*(E4>=Streets!$D$5:$D$30)*(D4=Streets!$A$5:$A$30)))))

to

Excel Formula:
=IF(0=VLOOKUP(D4,Streets!$A$5:$C$35,2,FALSE),VLOOKUP(D4,Streets!$A$5:$C$35,3,FALSE),INDEX(Streets!$C$5:$C$35,MAX((ROW($1:$26)*(E4>=Streets!$D$5:$D$35)*(D4=Streets!$A$5:$A$35)))))

- Because I added 5 new streets, I thought I just need to change C/D30 to C/D35

But I got errors, and e.g. "Central Avenue" which was "splitted" before, now I am getting other results...

What should I do if I want to change streets or add new streets ?
 
Upvote 0
You also have to change the ROW instruction from $1 to $26 TO $1:$31 because you added 5 rows.
 
Upvote 0
Hmmm .... Now I have some issue that I wasn't aware of with streets... They have ODD and EVEN numbers.

So... Central Avenue can be up to 1-31 in "Santa Monica", while Central Avenue 2-26 is in "Santa Monica" but 28-52 is "West Hollywood" ... So, 28 can't be used like in formulas like above... Is there any option to do something about those streets that split in some parts with ODD and EVEN numbers, even if I have to do them in other table ? A lot of them don't split, but those that does, I could maybe put them in my first table as regular , but "central avenue" is "santa monica, west hollywood" and than in other table i have central avenue 1, 2, 3, 4,.... 26,27,29,31 is in "Santa Monica" while "28, 30, 32,33...." is in "West Hollywood" ...

I just don't know how :(

OVO RADIIIII. FINAL COUNTDOWN.xlsx
ABCD
1StreetStreet NoODD/EVENRegion
2Central Avenue1FALSESANTA MONICA
3Central Avenue2TRUESANTA MONICA
4Central Avenue3FALSESANTA MONICA
5Central Avenue4TRUESANTA MONICA
6Central Avenue5FALSESANTA MONICA
7Central Avenue6TRUESANTA MONICA
8Central Avenue7FALSESANTA MONICA
9Central Avenue8TRUESANTA MONICA
10Central Avenue9FALSESANTA MONICA
11Central Avenue10TRUESANTA MONICA
12Central Avenue11FALSESANTA MONICA
13Central Avenue12TRUESANTA MONICA
14Central Avenue13FALSESANTA MONICA
15Central Avenue14TRUESANTA MONICA
16Central Avenue15FALSESANTA MONICA
17Central Avenue16TRUESANTA MONICA
18Central Avenue17FALSESANTA MONICA
19Central Avenue18TRUESANTA MONICA
20Central Avenue19FALSESANTA MONICA
21Central Avenue20TRUESANTA MONICA
22Central Avenue21FALSESANTA MONICA
23Central Avenue22TRUESANTA MONICA
24Central Avenue23FALSESANTA MONICA
25Central Avenue24TRUESANTA MONICA
26Central Avenue25FALSESANTA MONICA
27Central Avenue26TRUESANTA MONICA
28Central Avenue27FALSESANTA MONICA
29Central Avenue28TRUEWEST HOLLYWOOD
30Central Avenue29FALSESANTA MONICA
31Central Avenue30TRUEWEST HOLLYWOOD
32Central Avenue31FALSESANTA MONICA
33Central Avenue32TRUEWEST HOLLYWOOD
34Central Avenue33FALSEWEST HOLLYWOOD
35Central Avenue34TRUEWEST HOLLYWOOD
36Central Avenue35FALSEWEST HOLLYWOOD
37Central Avenue36TRUEWEST HOLLYWOOD
38Central Avenue37FALSEWEST HOLLYWOOD
39Central Avenue38TRUEWEST HOLLYWOOD
40Central Avenue39FALSEWEST HOLLYWOOD
41Central Avenue40TRUEWEST HOLLYWOOD
42Central Avenue41FALSEWEST HOLLYWOOD
43Central Avenue42TRUEWEST HOLLYWOOD
44Central Avenue43FALSEWEST HOLLYWOOD
45Central Avenue44TRUEWEST HOLLYWOOD
46Central Avenue45FALSEWEST HOLLYWOOD
47Central Avenue46TRUEWEST HOLLYWOOD
48Central Avenue47FALSEWEST HOLLYWOOD
49Central Avenue48TRUEWEST HOLLYWOOD
50Central Avenue49FALSEWEST HOLLYWOOD
51Central Avenue50TRUEWEST HOLLYWOOD
52Central Avenue51FALSEWEST HOLLYWOOD
53Central Avenue52TRUEWEST HOLLYWOOD
54Central Avenue53FALSEPASADENA
55Central Avenue54TRUEWEST HOLLYWOOD
56Central Avenue55FALSEPASADENA
57Central Avenue56TRUEWEST HOLLYWOOD
58Central Avenue57FALSEPASADENA
59Central Avenue58TRUEWEST HOLLYWOOD
60Central Avenue59FALSEPASADENA
61Central Avenue60TRUEPASADENA
62Central Avenue61FALSEPASADENA
63Central Avenue62TRUEPASADENA
64Central Avenue63FALSEPASADENA
65Central Avenue64TRUEPASADENA
66Central Avenue65FALSEPASADENA
67Central Avenue66TRUEPASADENA
68Central Avenue67FALSEPASADENA
69Central Avenue68TRUEPASADENA
70Central Avenue69FALSEPASADENA
71Central Avenue70TRUEPASADENA
72Central Avenue71FALSEPASADENA
73Central Avenue72TRUEPASADENA
74Central Avenue73FALSEPASADENA
75Central Avenue74TRUEPASADENA
76Central Avenue75FALSEPASADENA
77Central Avenue76TRUEPASADENA
78Central Avenue77FALSEPASADENA
Sheet1
Cell Formulas
RangeFormula
C2:C78C2=ISEVEN(B2)
 
Last edited:
Upvote 0
I have found a solution to my problem via your solution ??

I just added streets above in "Streets" sheet, literally one by one so specific street number is "connected" to specific region. I have a lot of rows, not elegant, but if it works, than its perfect.

And instead of formulas in D and E columns, i just added "=B" two times, because ... it works :D

If you have any tip how to make it more elegant and easier for my problem, please share your opinion.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top