Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Automating Excel (Macros)
Is it possible to create a macro that will move down a certain number of
cells (for example, 10 cells) and then enter a number? Thanks in advanced. |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Automating Excel (Macros)
This will move down 10 rows and insert the row number ... as an example.
Sub test() ActiveCell.Offset(10, 0).Select ActiveCell.Value = ActiveCell.Row End Sub Regards Trevor "Outlook Convert" wrote in message ... Is it possible to create a macro that will move down a certain number of cells (for example, 10 cells) and then enter a number? Thanks in advanced. |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Automating Excel (Macros)
Does this require VBA knowledge? If so, I don't know VBA. Where (what
screen) would I enter what you typed? I don't want this macro to insert a row number - I want it to insert a number that I provide. Thanks. "Trevor Shuttleworth" wrote: This will move down 10 rows and insert the row number ... as an example. Sub test() ActiveCell.Offset(10, 0).Select ActiveCell.Value = ActiveCell.Row End Sub Regards Trevor "Outlook Convert" wrote in message ... Is it possible to create a macro that will move down a certain number of cells (for example, 10 cells) and then enter a number? Thanks in advanced. |
#4
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Automating Excel (Macros)
Sub test2()
NumberToBeInput = InputBox("Enter a Number", "Input", 1) ActiveCell.Offset(10, 0).Select ActiveCell.Value = NumberToBeInput End Sub When in Excel, press Alt-F11 to open the Visual Basic Editor (VBE) Select Insert | Module and then paste the code Regards Trevor "Outlook Convert" wrote in message ... Does this require VBA knowledge? If so, I don't know VBA. Where (what screen) would I enter what you typed? I don't want this macro to insert a row number - I want it to insert a number that I provide. Thanks. "Trevor Shuttleworth" wrote: This will move down 10 rows and insert the row number ... as an example. Sub test() ActiveCell.Offset(10, 0).Select ActiveCell.Value = ActiveCell.Row End Sub Regards Trevor "Outlook Convert" wrote in message ... Is it possible to create a macro that will move down a certain number of cells (for example, 10 cells) and then enter a number? Thanks in advanced. |
#5
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Automating Excel (Macros)
Excellent! It worked Trevor! Thanks!
"Trevor Shuttleworth" wrote: Sub test2() NumberToBeInput = InputBox("Enter a Number", "Input", 1) ActiveCell.Offset(10, 0).Select ActiveCell.Value = NumberToBeInput End Sub When in Excel, press Alt-F11 to open the Visual Basic Editor (VBE) Select Insert | Module and then paste the code Regards Trevor "Outlook Convert" wrote in message ... Does this require VBA knowledge? If so, I don't know VBA. Where (what screen) would I enter what you typed? I don't want this macro to insert a row number - I want it to insert a number that I provide. Thanks. "Trevor Shuttleworth" wrote: This will move down 10 rows and insert the row number ... as an example. Sub test() ActiveCell.Offset(10, 0).Select ActiveCell.Value = ActiveCell.Row End Sub Regards Trevor "Outlook Convert" wrote in message ... Is it possible to create a macro that will move down a certain number of cells (for example, 10 cells) and then enter a number? Thanks in advanced. |
#6
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Automating Excel (Macros)
You're welcome. Thanks for the feedback.
Regards Trevor "Outlook Convert" wrote in message ... Excellent! It worked Trevor! Thanks! "Trevor Shuttleworth" wrote: Sub test2() NumberToBeInput = InputBox("Enter a Number", "Input", 1) ActiveCell.Offset(10, 0).Select ActiveCell.Value = NumberToBeInput End Sub When in Excel, press Alt-F11 to open the Visual Basic Editor (VBE) Select Insert | Module and then paste the code Regards Trevor "Outlook Convert" wrote in message ... Does this require VBA knowledge? If so, I don't know VBA. Where (what screen) would I enter what you typed? I don't want this macro to insert a row number - I want it to insert a number that I provide. Thanks. "Trevor Shuttleworth" wrote: This will move down 10 rows and insert the row number ... as an example. Sub test() ActiveCell.Offset(10, 0).Select ActiveCell.Value = ActiveCell.Row End Sub Regards Trevor "Outlook Convert" wrote in message ... Is it possible to create a macro that will move down a certain number of cells (for example, 10 cells) and then enter a number? Thanks in advanced. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automating swnding mails using macros on Excel. | Excel Worksheet Functions | |||
Automating Excel | Excel Discussion (Misc queries) | |||
Excel 97 - automating getting info from web | Excel Discussion (Misc queries) | |||
Excel 97 - automating getting info from web | Excel Discussion (Misc queries) | |||
AUTOMATING JOB SHEETS IN EXCEL | New Users to Excel |