Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 151
Default moving cursor in a macro

How do I have the macro move the cursor up one row from any cell.
ie: If cursor was on A13 before I run the macro and I want it to move A12
or if cursor was on B23 before I run the macro and I want it to move to B22

p.s. I've tried using the up arrow as well as Shift Enter and neither work

Amanda

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default moving cursor in a macro

The macro should have recorded the move if it was made while recording the
macro. But none the less, it looks like you want it to move up 1 row,
remaining in the same column.
Add this line of code just before the End Sub statement

ActiveCell.Offset(-1,0).Activate

should do it.

"Amanda" wrote:

How do I have the macro move the cursor up one row from any cell.
ie: If cursor was on A13 before I run the macro and I want it to move A12
or if cursor was on B23 before I run the macro and I want it to move to B22

p.s. I've tried using the up arrow as well as Shift Enter and neither work

Amanda

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 151
Default moving cursor in a macro

Perfect! Worked like a charm! you are a life saver!!

"JLatham" wrote:

The macro should have recorded the move if it was made while recording the
macro. But none the less, it looks like you want it to move up 1 row,
remaining in the same column.
Add this line of code just before the End Sub statement

ActiveCell.Offset(-1,0).Activate

should do it.

"Amanda" wrote:

How do I have the macro move the cursor up one row from any cell.
ie: If cursor was on A13 before I run the macro and I want it to move A12
or if cursor was on B23 before I run the macro and I want it to move to B22

p.s. I've tried using the up arrow as well as Shift Enter and neither work

Amanda

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default moving cursor in a macro

ActiveCell.Offset (-1,0).Select

Aqib Rizvi
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
moving the cursor in a macro Amanda Excel Discussion (Misc queries) 1 June 18th 09 02:05 AM
moving cursor PECOSBOB Excel Worksheet Functions 1 January 17th 09 01:27 PM
moving cursor aby New Users to Excel 2 November 2nd 08 10:45 PM
Moving cursor around excel Rare Earth Excel Discussion (Misc queries) 1 October 7th 08 11:52 PM
Moving Cursor within same cell nishockey19 Excel Discussion (Misc queries) 6 August 28th 08 09:14 PM


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

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

About Us

"It's about Microsoft Excel"