Manipulating data tables using VBA

jdmc45

Board Regular
Joined
May 8, 2011
Messages
144
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I receive raw data and would like to manipulate it using VBA in an automated way so its in a format to be loaded into Access.

There is three (or potentially more) tables of data on one worksheet (with 20 column headings of data and an unknown amount of rows), and just above every table will be a heading of PRIORITY 1, PRIORITY 2, etc. For example, cell A10 will have heading PRIORITY 2, then A11 to S11 will have the table headings and from A12-S12 downwards will be the data until there is two blank rows, then another heading say PRIORITY 3. The number of tables and the number of rows of data in each table are therefore unknown.

I would like a macro that aggregates all the data tables by getting rid of the blank rows and headings (PRIORITY 3, etc) and the column headings (except for the first one), and then cutting column D and inserting it in column A, for the whole worksheet.

The first table's heading will always be row 11, the first tables data will always start from row 12.

I'm sure this is a quick macro for a pro and would very much appreciate your help.

Thanks in advance,

J
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,215,425
Messages
6,124,825
Members
449,190
Latest member
rscraig11

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