Okay so I have 106,461 rows in my file. And there are 5323 rows specific rows I want to duplicate. I want to duplicate row 4, 10, 24, 30, 44, 50, 64, 70.... and so on and so forth. Is there any faster way to accomplish this?
Two questions:
Where do you want those rows to be duplicated into?
Is there a specific pattern rows are selected? It seems to me the rows are random.
Hi jpham and welcome to the forum,
Create a helper column in the column to the right of your columns of data. Put this formula in it and pull it down for all your rows.
In Row 1 and your helper column put this formua.
Copy this column and paste it using VALUES ONLY one column to the right of the helper.=IF(OR(MOD(ROW(),20)-4 = 0, MOD(ROW(),20)-4 = 6),"Dup","No")
Sort by this Values column so the Dup come to the top. Copy and paste the Dup rows.
Easy Peasy!
One test is worth a thousand opinions.
Click the * below to say thanks.
I would like the duplicate rows to appear either right below or right above of the original column. The columns i would like duplicated are 4+(20*n) and 10+(20*n). Let me know if you can help. Thanks!
If I were to write code like that, I'd do it in two steps.
1. Mark the lines you want saved.
I don't really know how to know which columns they are according to your formula but I'd place an "X" on an empty cell on the row you want duplicated.
2. Walk through a list as long as your database to check each line for the marker then insert cut cells there and push it down.
EDIT: Sorry for the lack of code. Could only help with the logic. I'm sure someone will pick this up soon.
Last edited by qcity; 06-16-2011 at 12:53 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks