Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings, Just recording a macro to insert a column in the middle of some
data, enter a formula and then copy the formula to cells below (having some problems with blank rows screwing this up but I'll leave that for another question). The number of rows in this data will vary, the recorded macro looks at what cell I move cursor to rather than just going right one cell or end down. How can I get around this, do I have to record the macro and then manually edit it to move one cell to right or end down where it has selected a cell address? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim,
Have you tried SendKeys ex 'the following is the same as pressing the down arrow 1 time: SendKeys "{DOWN}", True 'the following is the same as pressing the down arrow 11 times: SendKeys "{DOWN 11}", True 'the following will go to the last used cell in the current selected column: SendKeys "^{END}", True regards Mike "tim m" wrote: Greetings, Just recording a macro to insert a column in the middle of some data, enter a formula and then copy the formula to cells below (having some problems with blank rows screwing this up but I'll leave that for another question). The number of rows in this data will vary, the recorded macro looks at what cell I move cursor to rather than just going right one cell or end down. How can I get around this, do I have to record the macro and then manually edit it to move one cell to right or end down where it has selected a cell address? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No I haven't tried those, I assume I would record the macro as I had been
doing and then edit it to take out the cell references in there and insert the send keys lines of code. I'll read up on SendKeys. Thanks! "Mike Gallagher" wrote: Tim, Have you tried SendKeys ex 'the following is the same as pressing the down arrow 1 time: SendKeys "{DOWN}", True 'the following is the same as pressing the down arrow 11 times: SendKeys "{DOWN 11}", True 'the following will go to the last used cell in the current selected column: SendKeys "^{END}", True regards Mike "tim m" wrote: Greetings, Just recording a macro to insert a column in the middle of some data, enter a formula and then copy the formula to cells below (having some problems with blank rows screwing this up but I'll leave that for another question). The number of rows in this data will vary, the recorded macro looks at what cell I move cursor to rather than just going right one cell or end down. How can I get around this, do I have to record the macro and then manually edit it to move one cell to right or end down where it has selected a cell address? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cursor movement to last cell with same number | Excel Discussion (Misc queries) | |||
How do I disable the cursor movement after hitting enter in a cell | Excel Discussion (Misc queries) | |||
Movement of cursor | Excel Worksheet Functions | |||
How do I make the Stop Recording bar pop up when recording macros | Excel Worksheet Functions | |||
recording the date when record was entered in cell in Excel | Excel Worksheet Functions |