Spltting address with a formila

stroffso

Board Regular
Joined
Jul 12, 2016
Messages
160
Office Version
  1. 365
Platform
  1. Windows
Hi,

I need to split some addresses with formulas and am not sure the right way of going about doing it.

I currently have two workbooks. One called Raw Data which has a series of columns and the other called master which looks up the raw tab.

On the raw tab there are 6 columns that are like so:


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"] U[/TD]
[TD="align: center"]V[/TD]
[TD="align: center"]W[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]Y[/TD]
[TD="align: center"]Z[/TD]
[/TR]
[TR]
[TD]Site Address[/TD]
[TD]Street[/TD]
[TD]Suburb[/TD]
[TD]Postcode[/TD]
[TD]State[/TD]
[TD]Postal Address[/TD]
[/TR]
[TR]
[TD]14 Lesson Street Charnwood NSW 2501[/TD]
[TD]14 Lesson Street[/TD]
[TD]Charnwood[/TD]
[TD]2501[/TD]
[TD]NSW[/TD]
[TD]14 Lesson Street Charnwood NSW 2501[/TD]
[/TR]
[TR]
[TD]52 Mater Street, Collingwood VIC 3066[/TD]
[TD]52 Mater Street[/TD]
[TD]Collingwood[/TD]
[TD]3066[/TD]
[TD]VIC[/TD]
[TD]1 Jones Street, Melbourne VIC 3000[/TD]
[/TR]
</tbody>[/TABLE]

What i need is for the master tab to look these up in a certain way and return data to the cells marked X in the table below using the following rules:


1. If the postal address is the same as the site address then "" needs to be returned.
2. If the postal address is different then the address in Column Z above needs to be split across Columns O-R below

There are no commas separating the addresses so this where I have the problem really.





[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]K[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]M[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]P[/TD]
[TD="align: center"]Q[/TD]
[TD="align: center"]R[/TD]
[/TR]
[TR]
[TD]Street[/TD]
[TD]Suburb[/TD]
[TD]State[/TD]
[TD]Postcode[/TD]
[TD]Postal Street[/TD]
[TD]Postal Suburb[/TD]
[TD]Postal State[/TD]
[TD]Postal post Code[/TD]
[/TR]
[TR]
[TD]='Raw'!V2[/TD]
[TD]='Raw'!W2[/TD]
[TD]='Raw'!Y2[/TD]
[TD]='Raw'!X2[/TD]
[TD="align: center"] X[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]X[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


All help greatly appreciated
 
How would I go about adding some array goodness into the mix?

Code:
SEARCH("Street", blah blah)

Something like (?):

Code:
SEARCH({"Street", "Road", "Avenue", "Boulevard", "Lane", "Cresent"}, blah blah)

Thanks.
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How would I go about adding some array goodness into the mix?

Code:
SEARCH("Street", blah blah)

Something like (?):

Code:
SEARCH({"Street", "Road", "Avenue", "Boulevard", "Lane", "Cresent"}, blah blah)

Thanks.

That awesome thank you!
 
Upvote 0
Wait, that array stuff actually works? My previous post was not a statement, rather it was a question.

Please advise.
 
Upvote 0
Wait, that array stuff actually works? My previous post was not a statement, rather it was a question.

Please advise.

Sorry I was referring to your earlier post detailing what was needed. thanks very much for your expertise and courtesy
 
Upvote 0

Forum statistics

Threads
1,224,798
Messages
6,181,038
Members
453,014
Latest member
Chris258

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