kojak43
Active Member
- Joined
- Feb 23, 2002
- Messages
- 270
Over a month ago someone wrote in about this subject and the follwing code was furnished.
"Using something like this
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A5")) Is Nothing Then
Range("A1:A5").Sort Range("A1"), xlAscending, Header:=xlYes
End If
End Sub
In Here, I'm sorting Range("A1:A5") each time one of the cells changes. I'm also assuming it has a title.
End of supplied code"
My confusion is the range. I would have to increase the range for my sheet, but how can I make the range grow as my rows increase?
"Using something like this
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A5")) Is Nothing Then
Range("A1:A5").Sort Range("A1"), xlAscending, Header:=xlYes
End If
End Sub
In Here, I'm sorting Range("A1:A5") each time one of the cells changes. I'm also assuming it has a title.
End of supplied code"
My confusion is the range. I would have to increase the range for my sheet, but how can I make the range grow as my rows increase?