Macro to transpose to row after blank lines

Gameiro

New Member
Joined
Feb 8, 2016
Messages
1
Hi folks,

I have this piece of data with this layout:


000xxxx1 - CLIENTE 1 (code and name)
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
Total - 000xxxx1 - CLIENTE 1 (code and name)
[white row]
[white row]
000xxxx2 - CLIENTE 2 (code and name)
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
Total - 000xxxx2 - CLIENTE 2 (code and name)
[white row]
[white row]
000xxxx3 - CLIENTE 3 (code and name)
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
PRODUCT CODE | PRODUCT DESCRIPTION | QUANTITY SOLD | UNIT PRICE | SALES VALUE
Total - 000xxxx3 - CLIENTE 3 (code and name)
[white row]
[white row]

and so on..

I need to transpose the client code and number to a column before the product code so I can pivot it (right?) and it would take a minutes if the data was not so big. The problem is that there are almost 30k lines of data and I was wondering if someone can sugest a macro to make it happen without me loosing a couple of days doing it manual. One nice thing is that the report is breaked with 2 empty lines after each client data (as I think that can be usefull). Ideally the total line after each client data would be deleted too.

Any help on this?

Thanks in advance and congrats on great community, I've already learned a lot with you guys;)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,215,650
Messages
6,126,010
Members
449,280
Latest member
Miahr

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