Autofill Macro

Maha

New Member
Joined
Mar 25, 2009
Messages
13
Hi...

I just wanted to create a macro to generate numbers sequentially(autofill)
in a column.
Ex:ID
1
2
3
.
.
This is to automatically generating numbers for a particular ID field.Pls guide me...
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
not sure why you would need a macro. In a cell type
=Row(a1)
then you can copy that down
 
Upvote 0

GTO

MrExcel MVP
Joined
Dec 9, 2008
Messages
6,155
Try:
Code:
Sub exa()
    Range("A1").Value = 1
    Range("A1").AutoFill Range("A1:A10"), xlFillSeries
End Sub

Hope this helps,

Mark
 
Upvote 0

Forum statistics

Threads
1,191,416
Messages
5,986,430
Members
440,029
Latest member
GabSSSH

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
Top