Stacking a table with a number of data columns into a table with just one column of data

CA_User

Board Regular
Joined
Nov 5, 2004
Messages
126
Hello. I am trying to stack data from a table with the the data stored in columns going across but I want it in a vertical view. I've attached two images. One with the raw format and the 2nd with the format I want the end result to look like. The number of columns could vary by month as some months could have 5 days of data and other months, it's 15 days of data. Each day is currently in a separate column. The number of rows also differ from month to month.

I'm looking for VBA cold to stack each day on top of each other and have the "day #" be a column of it's own. I tried to record data but it doesn't work since the data set is dynamic. Could someone please help?
 

Attachments

  • Raw Data.png
    Raw Data.png
    15 KB · Views: 33
  • Desired Result.png
    Desired Result.png
    34.5 KB · Views: 31

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Screenshot 2022-11-11 161123.pngScreenshot 2022-11-11 161228.png set up pivot with rows and values as they are here then in Pivot table design select repeat all item labels, No sub-totals and Tabular format
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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