ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to input the data as per the quantity (https://www.excelbanter.com/excel-worksheet-functions/163252-how-input-data-per-quantity.html)

Igneshwara reddy[_2_]

how to input the data as per the quantity
 
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

Gary''s Student

how to input the data as per the quantity
 
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
--
Gary''s Student - gsnu200750


"Igneshwara reddy" wrote:

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



All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com