ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   incrementing batches of numbers (https://www.excelbanter.com/excel-worksheet-functions/445596-incrementing-batches-numbers.html)

joe74

incrementing batches of numbers
 
I have a sheet, where I need to batch 500 products each containing 26 rows of information (13000 rows). after each batch of 26 there must be a space, which I have set up.

I now need to add in column 1 an SKU number for each batch, starting at SKU-00001 going upto SKU-00500.

I am wondering is there a way of using the drag and fill to run these numbers consecutively in batches of 26, to save me having to edit each one?

joe74

Quote:

Originally Posted by joe74 (Post 1600204)
I have a sheet, where I need to batch 500 products each containing 26 rows of information (13000 rows). after each batch of 26 there must be a space, which I have set up.

I now need to add in column 1 an SKU number for each batch, starting at SKU-00001 going upto SKU-00500.

I am wondering is there a way of using the drag and fill to run these numbers consecutively in batches of 26, to save me having to edit each one?

I maybe should have pointed out, each batch of 26 rows should have the same SKU number, a space, then the next SKU number in order.

Don Guillett[_2_]

incrementing batches of numbers
 
On Monday, March 26, 2012 10:31:10 AM UTC-5, joe74 wrote:
I have a sheet, where I need to batch 500 products each containing 26
rows of information (13000 rows). after each batch of 26 there must be a
space, which I have set up.

I now need to add in column 1 an SKU number for each batch, starting at
SKU-00001 going upto SKU-00500.

I am wondering is there a way of using the drag and fill to run these
numbers consecutively in batches of 26, to save me having to edit each
one?




--
joe74


Sub numbersincolumn()
n = 1
For i = 1 To 500 Step 26
Cells(i, 3).Resize(26).Value = "00A" & n
n = n + 1
Next i
End Sub

joe74

Quote:

Originally Posted by Don Guillett[_2_] (Post 1600216)
On Monday, March 26, 2012 10:31:10 AM UTC-5, joe74 wrote:
I have a sheet, where I need to batch 500 products each containing 26
rows of information (13000 rows). after each batch of 26 there must be a
space, which I have set up.

I now need to add in column 1 an SKU number for each batch, starting at
SKU-00001 going upto SKU-00500.

I am wondering is there a way of using the drag and fill to run these
numbers consecutively in batches of 26, to save me having to edit each
one?




--
joe74


Sub numbersincolumn()
n = 1
For i = 1 To 500 Step 26
Cells(i, 3).Resize(26).Value = "00A" & n
n = n + 1
Next i
End Sub

Hi Don, I may be being a nugget here, but I dont know what you mean


All times are GMT +1. The time now is 09:14 PM.

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