Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
E_Dirksen,
I have created a macro for you. Please place this into a module inside of VBA and run the Macro (ToolsMacroNumber_Range). It can be amended to start at the active cell, but currently it will ask you what Range and then what you want the starting number to be. Sub Number_Range() Dim xlssheet As Excel.Worksheet Dim x As Long Dim rng As String Dim y As Long Dim z As Long Set xlssheet = Excel.ActiveSheet x = 1 rng = InputBox("Enter Range (i.e. A1:A5)", "Range") y = InputBox("Enter Starting Value", "Start") xlssheet.Range(rng).Select z = Selection.Cells.Count For x = 1 To z xlssheet.Cells(x, 1).Value = y y = y + 1 Next End Sub "E_Dirksen" wrote: Hello, I've been trying to create a Macro that when a button is clicked, the cell will place a number in the box and then move down one row in the same column. I can ove the cell down a row but I need to be able to automatically incrment the number by 1 each time. Can anyone help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
suspend auto increment | Excel Discussion (Misc queries) | |||
auto increment | Excel Discussion (Misc queries) | |||
DP Auto increment | Excel Worksheet Functions | |||
How to auto-number (increment) invoices in Excel? | Excel Discussion (Misc queries) | |||
how to auto increment a number each time i open the worksheet | Excel Worksheet Functions |