how to input the data as per the quantity

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have few data were in, based on the quantity the serial numbers has to be
copied or listed down.

Serial # Qty
12345 10
452689 5
4687863 25

So, in this case, the serial# 12345 has to be copied in Column C 10times and
in the same way serial# 452689 has to be continued in column C 5 times.

Please help me out on this and this is an very urgent.

Kindly do the needful.

Regards,
Igneshwara reddy

I have data like this
 
Run this small macro:

Sub marine()
k = 2
n = Cells(Rows.Count, 2).End(xlUp).Row
For i = 2 To n
j = Cells(i, 2).Value
v = Cells(i, 1).Value
For jj = 1 To j
Cells(k, 3).Value = v
k = k + 1
Next
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top