Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default selection change macro to go down 1 cell

i need a macro that will move the cursor down 1 when certain cells are
slected.
the cells are e13, e15, e17, e19, etc. when any of these r selected, i
would lie the cursor to go to e14, or e 16, or e 18, etc, so the
slection change is down 1.

thanks...
Tonso
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default selection change macro to go down 1 cell

Give this a try...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 5 And Target.Row 12 And Target.Row Mod 2 = 1 Then
Target.Offset(1).Select
End If
End Sub

--
Rick (MVP - Excel)



"Billy" wrote in message
...
i need a macro that will move the cursor down 1 when certain cells are
slected.
the cells are e13, e15, e17, e19, etc. when any of these r selected, i
would lie the cursor to go to e14, or e 16, or e 18, etc, so the
slection change is down 1.

thanks...
Tonso


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default selection change macro to go down 1 cell

On Apr 24, 2:44*pm, "Rick Rothstein"
wrote:
Give this a try...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
* If Target.Column = 5 And Target.Row 12 And Target.Row Mod 2 = 1 Then
* * Target.Offset(1).Select
* End If
End Sub

--
Rick (MVP - Excel)

"Billy" wrote in message

...



i need a macro that will move the cursor down 1 when certain cells are
slected.
the cells are e13, e15, e17, e19, etc. when any of these r selected, i
would lie the cursor to go to e14, or e 16, or e 18, etc, so the
slection change is down 1.


thanks...
Tonso- Hide quoted text -


- Show quoted text -


Rick,

Thanks! Got this to working just fine!
Again, many thanks,

Tonso
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
Change from Column Selection to Cell Selection Lil Pun[_16_] Excel Programming 4 June 16th 06 10:38 PM
run macro on selection change Tony Excel Programming 4 April 4th 06 05:12 AM
Macro to change list box input range based on selection made in another cell Sue[_6_] Excel Programming 3 October 7th 04 06:45 PM
Selection change: How to run a Macro Maria[_6_] Excel Programming 1 March 2nd 04 12:57 PM
Macro to only change selection Del[_3_] Excel Programming 3 December 16th 03 04:30 PM


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

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

About Us

"It's about Microsoft Excel"