![]() |
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
Insert New Rows Between Rows
Hey guys,
I found out that selecting multiple rows by hand and then inserting rows would result in inserting new rows between the selected rows. The following macro shows this: VBA:
VBA tags courtesy of www.thecodenet.com
Now, what I need to do is this: VBA:
VBA tags courtesy of www.thecodenet.com
Run-time error '1004': Method 'Range' of object 'Global_' failed I know there are plenty of ways to achieve the same result by creating a simple for-loop and inserting a new row after each row. This is NOT what I want to do, since this seems to be a lot slower. (I am speaking about 200.000-300.000 rows) Any ideas no how to get this working without a loop? |
|
Local Time: 11:25 AM
Local Date: 05-22-2013 Location:
|
|
|
|
#2 |
|
|
See if this is any good for you. You highlight the rows you want to copy and insert then enter how many times.
VBA:
VBA tags courtesy of www.thecodenet.com
------------------------------------------------ Thanks For All Your Help Windows 7 Excel 2010 Any codes I provide please try on a copy of your workbook first as these cannot be undone! To get the most precise answer, it is best to upload/attach a sample workbook (sensitive data scrubbed/removed/changed) that contains an example of your raw data on one worksheet, and on another worksheet your desired results. The structure and data types of the sample workbook must exactly duplicate the real workbook. Include a clear and explicit explanation of your requirements. |
|
Local Time: 08:25 PM
Local Date: 05-22-2013 Location:
|
|
|
|
#3 |
|
|
Pretty neat solution. I'll give it a try
![]() Thanks |
|
Local Time: 11:25 AM
Local Date: 05-22-2013 Location:
|
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


