Excel Macro to re-format data

moorej

New Member
Joined
Mar 17, 2003
Messages
30
I have data in multiple columns that repeats except for one date reference. The X0 column starts with a date and the date updates with the next data reference. I need to move the All data like the reference number in column A down to the next row until all have been moved. Column A is the place holder for the data. The data may repeat many more times than the example. In the example it only repeats 4 times. There are also many more columns of data, but in the example there are only 4.

The macro should run until there is no more data to move. The result should look like the lower example. I'm not sure how I can do this. I can modify a macro created with this example but have no clue as to how to begin to write it.

Any help would be welcome. Thanks in advance.


Data comes in like this

A B C D E F G H I J K L M N O P
NUMA NUMB X0 X0H
101064 670 3/1/2014 0.50 101064 670 4/1/2014 0.50 101064 670 5/1/2014 0.50 101064 670 6/1/2014 0.50
102065 671 3/1/2014 0.50 102065 671 4/1/2014 0.50 102065 671 5/1/2014 0.50 102065 671 6/1/2014 0.50
103067 673 3/1/2014 0.50 103067 673 4/1/2014 0.50 103067 673 5/1/2014 0.50 103067 673 6/1/2014 0.50

Would like to have it look like this

A B C D
NUMA NUMB X0 X0H
101064 670 3/1/2014 0.50
101064 670 4/1/2014 0.50
101064 670 5/1/2014 0.50
101064 670 6/1/2014 0.50
102065 671 3/1/2014 0.50
102065 671 4/1/2014 0.50
102065 671 5/1/2014 0.50
102065 671 6/1/2014 0.50
103067 673 3/1/2014 0.50
103067 673 4/1/2014 0.50
103067 673 5/1/2014 0.50
103067 673 6/1/2014 0.50
 

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.
moorej,

I guess our firewall will not allow a connection. I wasn't able to upload.

Can you post a screenshot of the actual raw data worksheet?

And, can you post a screenshot of the worksheet results (manually formatted by you) that you are looking for?

To post your data, you can download and install one of the following two programs:
Excel Jeanie
MrExcel HTML Maker

Or, when using Internet Explorer, just put borders around your data in Excel and copy those cells into your post.
See reply #2 the BLUE text in the following link:
http://www.mrexcel.com/forum/about-board/444901-how-create-table-like-aladin.html#post2198045
 
Upvote 0
moorej,

Thanks for the workbook.

Your two data sets are completely different.

Your new workbook, worksheet Sheet1, contains 234 columns?????

Can we have another workbook, containing the above mentioned Sheet1, and, on another worksheet (manually formatted by you) the results you are looking for?
 
Upvote 0
Hi hiker95,

The workbook I uploaded is sample data in the actual format of my raw data but fewer rows. There are 234 columns and currently 4889 rows (but the row count can grow). I included a modified macro from an above post that seems to work on the data set. The first 18 columns repeat 13 times with only a difference in column 17 in each.

Thanks for looking.
 
Upvote 0
moorej,

So that I can get it right the first time, I will need to see what the results should look like.

Can we have another workbook, containing the above mentioned Sheet1, and, on another worksheet (manually formatted by you) the results you are looking for?
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,695
Members
449,117
Latest member
Aaagu

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