VBA - how to copy row and add data based on value

bisik

New Member
Joined
May 24, 2017
Messages
8
Hi experts,
I have a problem regarding VBA in excel. I would like to convert my range of cells like this:
xdjOg.png

Please kindly help me, I am begging you. I am counting on you full. I have limited knowledge of VBA script
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I am only able to program till like this:
Public Sub sequenceCopy()
Dim rngSinglecell As Range
Dim rngQuantityCells As Range
Dim intCount As Integer


Set rngQuantityCells = Range("E2", Range("E2").End(xlDown))


" For Each rngSinglecell In rngQuantityCells
If IsNumeric(rngSinglecell.Value) Then
If rngSinglecell.Value > 0 Then
For intCount = 1 To rngSinglecell.Value
Range(rngSinglecell.Address).EntireRow.Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)

Next
End If
End If
Next
End Sub
" --> as suggest from JoeMo from last year post

Hi experts,
I have a problem regarding VBA in excel. I would like to convert my range of cells like this:
xdjOg.png

Please kindly help me, I am begging you. I am counting on you full. I have limited knowledge of VBA script
 
Upvote 0
up!
please, help!
i want to copy row. if cell B = 2W then it copy 8 rows, then if it is 1W copy 4 rows, f1 2 rows, f2 2 rows, m1 m2 m3 m4 1 row. then, the sheet 2 will look like my picture above. please, anyone
 
Upvote 0
:(:(:(:(
up!
please, help!
i want to copy row. if cell B = 2W then it copy 8 rows, then if it is 1W copy 4 rows, f1 2 rows, f2 2 rows, m1 m2 m3 m4 1 row. then, the sheet 2 will look like my picture above. please, anyone
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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