LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Move to a set cell if

Try it like this:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H7:H27"
Dim TRow As Integer

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
TRow = Target.Row
With Target
If LCase(Cells(TRow, 6).Value) = "no" Or _
LCase(Cells(TRow, 7).Value) = "no" Or _
LCase(Cells(TRow, 8).Value) = "no" Then
Cells(TRow, 10).Activate
Else
Cells(TRow + 1, 6).Activate
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub


Hope this helps
Rowan

RJG wrote:
Bob,
I realise this must be starting to turn into a bad dream, I have
tried your suggestion but it returns the curser to the same point. (J7)
but in reality I would like it to go to the row in question (J7:J27). I
have tried "playing" with the code without success. Is there an easy
fix.??

 
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
How do I move from cell A 10 to cell B1 with one move or click chipsdad Excel Worksheet Functions 3 June 6th 09 03:43 AM
Arrow keys move screen instead of moving from cell to cell LuisGe Excel Discussion (Misc queries) 3 May 22nd 09 11:17 PM
formula, move to previous cell when the current cell=0 or empty osama amer Excel Discussion (Misc queries) 0 May 29th 06 12:18 PM
How do I make my arrow buttons move from cell to cell in Excel? slickd1200 Excel Discussion (Misc queries) 1 April 17th 06 05:42 PM
arrow keys move entire sheet instead of cell to cell gbeard Excel Worksheet Functions 2 April 13th 05 04:59 PM


All times are GMT +1. The time now is 01:23 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"