#1
|
|||
|
|||
Excel VBA Help
I am building a big spreadsheet in excel, and I was wondering if I could create a macro that moves the Active Cell one cell down and one cell to the right. Does anyone know if this is possible or how to do it? Any help would be greatly appreciated. Also, recommendations to any other forums where I might find the answer would be appreciated.
|
#2
|
|||
|
|||
Re: Excel VBA Help
If you want all the other cells to move as well:
Record a macro select a cell insert a cell above it moving it down insert a cell to the right of it moving the cells to the left stop the macro If you want to cut and paste overwriting the contents of the target but not moving other cells: Record a macro select a cell cut paste in target stop the macro You may have to edit the last macro to generalize the target cell from source cell, but it should just be a matter of taking the active cell and adding one to the row and column. |
#3
|
|||
|
|||
Re: Excel VBA Help
As the other poster said, learning how to create macros is as simple as just recording one and then looking at the code.
As someone who has done programmatic access (via vbscripts or apps) to Word and Excel I cannot tell you how easy it was to do fancy junk by just ganking the code after recording the macro. |
#4
|
|||
|
|||
Re: Excel VBA Help
I tried recording first, but it didn't work because it records the absolute position of the cell rather than the relative one. For example, if I start at A1 and move to B2 the recorded macro just says Range("B2").select. Someone on the software forum gave me the solution, but thank you anyway for your help.
|
|
|