Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.
Sub y_Replicate_Data() Dim i As Variant Dim J As Variant Dim k As Variant If MsgBox("Would you like to replicate the data records based on the number of units in Column E?" & vbCrLf & vbCrLf & _ "Please make SURE ..." & vbCrLf & vbCrLf & _ "(1)... that the number of units are located in Column E and ..." & vbCrLf & _ "(2)... the article numbers are sorted in ascending orders!", vbYesNo + vbQuestion, "Replicate Data") = vbNo Then Exit Sub End If UsedRange = ActiveSheet.UsedRange.Rows.Count For i = UsedRange To 2 Step -1 J = ActiveSheet.Cells(i, 5) For k = J - 1 To 1 Step -1 Set Rng = ActiveSheet.Range("E" & i).EntireRow Rng.Copy Rng.Offset(1).Insert Shift:=xlDown Next Next End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Excel VBA inserting a formula||12||39|
|MS Access vba Print PDF First page only||16||34|
|Save PowerPoint from Active Workbook Excel VBA||5||38|
|my excel file states circular references, how do i find them?||2||22|
Join the community of 500,000 technology professionals and ask your questions.