Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vba excel - autofill
Hi all, I need to fill some cells with integer numbers starting from 1: For example, I need to fill from Cell B15 to B25 with the number 1...to 10 I am trying this: Range("B15:B25").Select Selection.AutoFill Destination:=Range("B15:B25") Type:=xlFillDefault Can anybody help, please? Thanks, Aldo -- ajliak ----------------------------------------------------------------------- ajliaks's Profile: http://www.excelforum.com/member.php...nfo&userid=819 View this thread: http://www.excelforum.com/showthread.php?threadid=27825 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vba excel - autofill
Sub FillRange()
Range("B15").Value = 1 Range("B16").Value = 2 Range("B15:B16").AutoFill Destination:= _ Range("B15:B25"), Type:=xlFillDefault End Sub fills from 1 . . . to 11 (you have 11 cells). this also works: Sub FillRange1() Range("B15").Value = 1 Range("B15:B25").DataSeries _ Rowcol:=xlColumns, _ Type:=xlLinear, _ Date:=xlDay, _ Step:=1, _ Stop:=11, _ Trend:=False End Sub -- Regards, Tom Ogilvy "ajliaks" wrote in message ... Hi all, I need to fill some cells with integer numbers starting from 1: For example, I need to fill from Cell B15 to B25 with the numbers 1...to 10 I am trying this: Range("B15:B25").Select Selection.AutoFill Destination:=Range("B15:B25") , Type:=xlFillDefault Can anybody help, please? Thanks, Aldo. -- ajliaks ------------------------------------------------------------------------ ajliaks's Profile: http://www.excelforum.com/member.php...fo&userid=8196 View this thread: http://www.excelforum.com/showthread...hreadid=278254 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofill - Excel | Excel Worksheet Functions | |||
How do you make the little autofill box in Excel go away? | Excel Discussion (Misc queries) | |||
Autofill: Need to autofill one week block, (5) weekday only into cells. | Excel Discussion (Misc queries) | |||
Q. Autofill question: Can I autofill alpha characters like I can numbers? | Excel Programming | |||
Excel AutoFill | Excel Programming |