Need help with a macro!

mr.durden

New Member
Joined
Oct 17, 2012
Messages
14
Hi there,

I have a spreadsheet which has been awkwardly formatted by a client with over 50,000 rows. I've tried creating my own macro to automate the work but it just won't seem to work (i'm probably missing something obvious).

At the moment the data looks like this:

00229268Example 16089+8038
00157910Example 26090+6274

<colgroup><col><col><col></colgroup><tbody>
</tbody>

I want it to look like this:

00229268Example 16089
00229268Example 18038

<tbody>
</tbody>
00157910Example 26090
00157910Example 26274

<tbody>
</tbody>


At the moment I am copying and inserting endlessly. Please help me!

Thanks
 
Hi Tiger,

Thanks for this. I tried to run it but it brought up a debug error on this line of code:

<code>For varNum = Split(Cells(rIndex, strSplitCol).Value, "-")(0) To Split(Cells(rIndex, strSplitCol).Value, "-")(1)</code>

Any ideas?
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,217,359
Messages
6,136,097
Members
449,991
Latest member
IslandofBDA

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