What I'm trying to do is if I am on the last row of a range. I want to go up one row.
What I'm trying to do is if I am on the last row of a range. I want to go up one row.
if Activecell.Row=rng.rows.count then activecell.offset(-1,0).select
something like that would be a good start, rng needs to be defined, so "set rng=activesheet.range("A1:A20")" for instance
Put this in the worksheet selection change.
=ROW() will tell you what row you are at
= COLUMN() will tell you which column you are at
Click on star (*) below if this helps
Nathansav, even though they are equal the select isnt being executed any ideas?
![]()
If ActiveCell.row = Range("seqNum").Rows.Count Then ActiveCell.Offset(-2, 0).Select End If
I've just tried it and it works, have you put it in the worksheet_selectionchange event?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = Range("N").Rows.Count Then
ActiveCell.Offset(-2, 0).Select
End If
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks