Quick Array help

IanWells

Board Regular
Joined
Apr 2, 2003
Messages
86
If i was creating an array with sequential numbers from 100 going up to 4000 in 100's is there a quick way instead of

numseq = array ("100", "200", "300", etc etc)

these are names of worksheets within a workbook.

Many thanks

Ian

excel 2007
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
A few methods

Code:
Sub Standard()
Dim lngArr() As Long, lngUpper As Long, lngStep As Long
lngUpper = 4000
lngStep = 100
ReDim lngArr((lngUpper / lngStep) - 1)
For lngi = LBound(lngArr) To UBound(lngArr)
    lngArr(lngi) = lngStep + (lngStep * lngi)
Next lngi
End Sub
 
Upvote 0
A1 100
A2 =a1+100
Drag down to the number you need. In a column next to it highlight from B1 to the equivalent bottom of where the A column is. Should be B40. In B1 type an = sign then select A1:A40 and CSE control+shift+enter. That should copy the numbers. After you have that you hit F2 then F9 and you have your numbers and ctrl+C is it.
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,128
Members
448,947
Latest member
test111

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