Loop Macro

MOXY1975

New Member
Joined
Apr 25, 2013
Messages
26
I have 4 workbooks with data from 2018 - 2021 subdivided into 1 worksheet for each month. So 48 worksheets.

Each worksheet has data in a cross tab array B5:JJ1349 - JJ1492 (depending on the days in the month).

The array width will change over time as additional "units" come online.

For some reason every other column after column C is blank.

Range B5 - B9 are Category headings that will allow me to sort / filter the data afterwards and need to be repeated across the

Range B10:B1492 is date / time data

I am looking to create a macro that transfers the cross tab into a row / column list where column B-F contains the category name details, column G contains the Date / Time data nd Column H contains the data previously stored in columns but instead now runs down as row data. Where the data column is blank i want the macro to skip it and once it has done one worksheet to loop into the subsequent worksheets until I have a single spreadsheet showing all data in a row / column format per year.

The attached screenshot will hopefully help illustrate what I have and what I want/need.

Thanks in advance.
 

Attachments

  • Excel .png
    Excel .png
    66.6 KB · Views: 8

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,214,429
Messages
6,119,424
Members
448,896
Latest member
MadMarty

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