obiwilson
New Member
- Joined
- Jul 25, 2015
- Messages
- 17
Hi,
I have a large (40K) address database to clean up. The initial cleanup involves removing all the blank cells and shifting the data left (columns J to M), based upon what the address starts with (letters or numbers) it needs to be moved back to the either the Business Name column or the Address 1 column. And just to make things complicated, if the address begins with "shop" or "PO Box" it needs to be moved to the Address 1 column.
I have manually achieved this using Ctrl + G and removing blanks, shifting left, sorting a-z and moving Shop/PO Box 1 column across. However, I would like to automate the process up to this point for future cleaning but was unable to achieve the same results within Power Query. I tried some similar solution on the forums but was unable to get the unpivot/pivot solution or M code solutions to work.
Here is a sample of what I'm working with:
And this is what I need it to be:
Any help is greatly appreciated!
I have a large (40K) address database to clean up. The initial cleanup involves removing all the blank cells and shifting the data left (columns J to M), based upon what the address starts with (letters or numbers) it needs to be moved back to the either the Business Name column or the Address 1 column. And just to make things complicated, if the address begins with "shop" or "PO Box" it needs to be moved to the Address 1 column.
I have manually achieved this using Ctrl + G and removing blanks, shifting left, sorting a-z and moving Shop/PO Box 1 column across. However, I would like to automate the process up to this point for future cleaning but was unable to achieve the same results within Power Query. I tried some similar solution on the forums but was unable to get the unpivot/pivot solution or M code solutions to work.
Here is a sample of what I'm working with:
Associate ID | Associate Client Code | Prefix | First Name | Middle | Last Name | Suffix | Greeting | Specialty | Business Name | Address 1 | Address 2 | Address 3 | City | State | Zip Code |
70396157 | I00:26:21 | Test | Account | Doctor | Epping Plaza Medical & Dental Centre | Shop 216 Epping Plaza | 571-583 High Street | EPPING | VIC | 3076 | |||||
91556921 | I00:26:27 | Test | Account | Doctor | Chelsea Arcade Medical | Shop 10 & 11 | 426 Nepean Highway | CHELSEA | VIC | 3196 | |||||
90094825 | I00:26:37 | Test | Account | Doctor | Bentleigh Medical Centre | 254 Centre Road | BENTLEIGH | VIC | 3204 | ||||||
57666989 | I00:30:19 | Test | Account | Doctor | Strathdale Medical Centre | 5-7 Putnam Avenue | STRATHDALE | VIC | 3550 | ||||||
80436127 | I00:23:56 | Test | Account | Doctor | Victorian Rehabilitation Centre | 499 Springvale Road | GLEN WAVERLEY | VIC | 3150 | ||||||
91437137 | I00:32:45 | Test | Account | Doctor | Bentleigh Medical Centre | 254 Centre Road | BENTLEIGH | VIC | 3204 | ||||||
309085570 | I00:33:49 | Test | Account | Doctor | Victoria Harbour Medical Centre | 800 Bourke Street | DOCKLANDS | VIC | 3008 | ||||||
63523884 | I00:10:42 | Test | Account | Doctor | Shop 49 | Lonsdale Street | MELBOURNE | VIC | 3000 | ||||||
103394111 | I00:11:36 | Test | Account | Doctor | Highlands Medical Centre | Shop 22, Stockland Highlands | 300-332 Grand Boulevard | CRAIGIEBURN | VIC | 3064 | |||||
82192344 | I00:36:28 | Test | Account | Doctor | PO Box 123 | 379-381 Whitehorse Road | BALWYN | VIC | 3103 | ||||||
And this is what I need it to be:
Associate ID | Associate Client Code | Prefix | First Name | Middle | Last Name | Suffix | Greeting | Specialty | Business Name | Address 1 | Address 2 | Address 3 | City | State | Zip Code |
70396157 | I00:26:21 | Test | Account | Doctor | Epping Plaza Medical & Dental Centre | Shop 216 Epping Plaza | 571-583 High Street | EPPING | VIC | 3076 | |||||
91556921 | I00:26:27 | Test | Account | Doctor | Chelsea Arcade Medical | Shop 10 & 11 | 426 Nepean Highway | CHELSEA | VIC | 3196 | |||||
90094825 | I00:26:37 | Test | Account | Doctor | Bentleigh Medical Centre | 254 Centre Road | BENTLEIGH | VIC | 3204 | ||||||
57666989 | I00:30:19 | Test | Account | Doctor | Strathdale Medical Centre | 5-7 Putnam Avenue | STRATHDALE | VIC | 3550 | ||||||
80436127 | I00:23:56 | Test | Account | Doctor | Victorian Rehabilitation Centre | 499 Springvale Road | GLEN WAVERLEY | VIC | 3150 | ||||||
91437137 | I00:32:45 | Test | Account | Doctor | Bentleigh Medical Centre | 254 Centre Road | BENTLEIGH | VIC | 3204 | ||||||
309085570 | I00:33:49 | Test | Account | Doctor | Victoria Harbour Medical Centre | 800 Bourke Street | DOCKLANDS | VIC | 3008 | ||||||
63523884 | I00:10:42 | Test | Account | Doctor | Shop 49 | 1 Lonsdale Street | MELBOURNE | VIC | 3000 | ||||||
103394111 | I00:11:36 | Test | Account | Doctor | Highlands Medical Centre | Shop 22, Stockland Highlands | 300-332 Grand Boulevard | CRAIGIEBURN | VIC | 3064 | |||||
82192344 | I00:36:28 | Test | Account | Doctor | PO Box 123 | 379-381 Whitehorse Road | BALWYN | VIC | 3103 | ||||||
Any help is greatly appreciated!