Found several posts about how to make duplicates but all of them only made duplicates of 1 colum.
I got 4 colums and 80 rows and I wanna just make duplicates of all of them.
Any VBA code for that or another simple trick?
Found several posts about how to make duplicates but all of them only made duplicates of 1 colum.
I got 4 colums and 80 rows and I wanna just make duplicates of all of them.
Any VBA code for that or another simple trick?
Where would you like the duplicates to appear. Suppose your first row of data is in A2:D2, where would the duplication appear?
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Let's say it look like this
Colum A - First Name
Bill
Steve
Hugh
Colum B - Surname
Gates
Jobs
Heffner
Colum C - ID-Number
1337
1285
1234
Colum D - Position
CEO
Dead
Legend
And I want it to duplicate it all just the row below/above, doesn't mather.
So it would look like this
Bill Gates 1337 CEO
Bill Gates 1337 CEO
Steve Jobs 1285 Dead
Steve Jobs 1285 Dead
Hugh Heffner 1234 Legend
Hugh Heffner 1234 Legend
Last edited by Challebjoern; 12-03-2015 at 06:10 AM.
![]()
Option Explicit Sub TimesFive() Dim LR As Long: LR = Range("A" & Rows.Count).End(xlUp).Row Dim BR As Long: BR = LR * 2 Rows("1:" & LR).Copy Rows(LR + 1 & ":" & BR) Range("A1").CurrentRegion.Sort Key1:=[A1], Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub
Found this code that worked, but it duplicates everything in the sheet which is kinda annoying.
Last edited by Challebjoern; 12-03-2015 at 10:51 AM.
Code Tags Added
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html
(Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
Does this help?
![]()
Sub Challebjoern() Dim i As Long, x As Long For i = Range("A" & Rows.Count).End(3).row To 2 Step -1 x = 2 Do Until x = 1 Range(Cells(i, "A"), Cells(i, "D")).Copy Cells(i, "A").Insert xlDown x = x - 1 Loop Next i End Sub
You're welcome. Glad to help out and thanks for the feedback. Please mark this thread as SOLVED: Click Thread Tools above your first post, select "Mark your thread as Solved"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks