ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cursor movement in a macro (https://www.excelbanter.com/excel-discussion-misc-queries/125611-cursor-movement-macro.html)

Kanga

Cursor movement in a macro
 
This is really basic but I could not find a thread. I want to control the
movement of the cursor. Instead of moving up 7 cells, the macro records the
cell it ends up in. How do I get the macro to just go up a specific number
of cells.

Thanks, Kanga


Gary''s Student

Cursor movement in a macro
 
Sub moveup()
Selection.Offset(-7, 0).Select
End Sub

--
Gary's Student


"Kanga" wrote:

This is really basic but I could not find a thread. I want to control the
movement of the cursor. Instead of moving up 7 cells, the macro records the
cell it ends up in. How do I get the macro to just go up a specific number
of cells.

Thanks, Kanga


Kanga

Cursor movement in a macro
 
Thanks Gary, thats all I needed and my macro is complete.

"Gary''s Student" wrote:

Sub moveup()
Selection.Offset(-7, 0).Select
End Sub

--
Gary's Student


"Kanga" wrote:

This is really basic but I could not find a thread. I want to control the
movement of the cursor. Instead of moving up 7 cells, the macro records the
cell it ends up in. How do I get the macro to just go up a specific number
of cells.

Thanks, Kanga


Gary''s Student

Cursor movement in a macro
 
You are very welcome.
--
Gary's Student


"Kanga" wrote:

Thanks Gary, thats all I needed and my macro is complete.

"Gary''s Student" wrote:

Sub moveup()
Selection.Offset(-7, 0).Select
End Sub

--
Gary's Student


"Kanga" wrote:

This is really basic but I could not find a thread. I want to control the
movement of the cursor. Instead of moving up 7 cells, the macro records the
cell it ends up in. How do I get the macro to just go up a specific number
of cells.

Thanks, Kanga



All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com