VBA - Help cleaning data

omnivl

Board Regular
Joined
Aug 25, 2014
Messages
53
Hi
Im stuck on how to achieve this so any input would be appreciated. I have imported the data from tables in Word and I need to clean and sort it. Its a fair bit of data (50,000 rows).
The imported data is set out as per below:


CEMETERIES AND CREMATORIA ACT 2003 provisions
Column 1Column 2Column 3Column 4
PROVISIONPOWER, FUNCTION OR ITEM DELEGATEDDELEGATECONDITIONS & LIMITATIONS
s.12(1)function to properly and efficiently manageCorporate;Main Officer
where Class B
s.12(2) duty to have regard to the matters set out in paragraphsCorporatewhere Class B
DOMESTIC ANIMALS ACT 1994
Column 1Column 2Column 3Column 4
PROVISIONPOWER, FUNCTION OR ITEM DELEGATEDDELEGATECONDITIONS AND LIMITATIONS
s.41A(1)
power to declare a dog to be a menacing dogCommunity Laws Coordinator;Senior Community Laws Officer;Community Laws Officerswhere Class C
ENVIRONMENT PROTECTION ACT 1970
Column 1Column 2Column 3
Column 4
PROVISIONPOWER, FUNCTION OR ITEM DELEGATEDDELEGATE
CONDITIONS & LIMITATIONS
r.53M(3)power to require further information Septic TanksDirector Development;Manager Statutory Serviceswhere Class B

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

I need to have the data cleaned and sorted like so:

Act
ProvisionPower, Function or Item DelegatedDelegateConditions & Limitations
CEMETERIES AND CREMATORIA ACT 2003 provisionss.12(1)function to properly and efficiently manageCorporatewhere Class B
CEMETERIES AND CREMATORIA ACT 2003 provisionss.12(1) function to properly and efficiently manageMain Officerwhere Class B
CEMETERIES AND CREMATORIA ACT 2003 provisionss.12(2) duty to have regard to the matters set out in paragraphsCorporatewhere Class B
DOMESTIC ANIMALS ACT 1994s.41A(1)power to declare a dog to be a menacing dogCommunity Laws Coordinatorwhere Class C
DOMESTIC ANIMALS ACT 1994s.41A(1)power to declare a dog to be a menacing dogSenior Community Laws Officerwhere Class C
DOMESTIC ANIMALS ACT 1994s.41A(1)power to declare a dog to be a menacing dogCommunity Laws Officerswhere Class C
ENVIRONMENT PROTECTION ACT 1970r.53M(3)power to require further information Septic TanksDirector Developmentwhere Class B
ENVIRONMENT PROTECTION ACT 1970r.53M(3)power to require further information Septic TanksManager Statutory Serviceswhere Class B

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

Thanks :)
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
This is fairly simple looping/reformatting via VBA. Just Do/Loop and move data to new target sheet. Do you need explicit code?
 
Upvote 0
So i have managed to get it into the following format..wow..ok so how do i split the delegate and add new row

Act
ProvisionPower, Function or Item DelegatedDelegateConditions & Limitations
CEMETERIES AND CREMATORIA ACT 2003 provisionss.12(1)function to properly and efficiently manageCorporate; Main Officer
where Class B
CEMETERIES AND CREMATORIA ACT 2003 provisions
s.12(2)duty to have regard to the matters set out in paragraphsCorporatewhere Class B

<tbody>
</tbody>

so it looks like this

ct
ProvisionPower, Function or Item DelegatedDelegateConditions & Limitations
CEMETERIES AND CREMATORIA ACT 2003 provisionss.12(1)function to properly and efficiently manageCorporatewhere Class B
CEMETERIES AND CREMATORIA ACT 2003 provisionss.12(1)function to properly and efficiently manageMain Officerwhere Class B
CEMETERIES AND CREMATORIA ACT 2003 provisionss.12(2)duty to have regard to the matters set out in paragraphsCorporatewhere Class B

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,487
Members
448,967
Latest member
visheshkotha

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