Recording macros....record cursor movement not cell address?

G

Guest

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.
 
G

Guest

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
 
G

Guest

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top