Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,089
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,089
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,089
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating swnding mails using macros on Excel. Brinda Excel Worksheet Functions 1 March 13th 06 03:03 PM
Automating Excel mvpejp Excel Discussion (Misc queries) 0 November 22nd 05 07:33 PM
Excel 97 - automating getting info from web [email protected] Excel Discussion (Misc queries) 0 August 22nd 05 01:43 PM
Excel 97 - automating getting info from web [email protected] Excel Discussion (Misc queries) 0 August 22nd 05 01:34 PM
AUTOMATING JOB SHEETS IN EXCEL bobby smith New Users to Excel 2 June 17th 05 05:50 PM


All times are GMT +1. The time now is 12:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"