Go to a cell that contains the data entered in another cell
Let's say that in A1 thru A365 we have 1/1/2008 thru 12/31/2008. In the
worksheet code area paste:
Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("B1")
If Intersect(Target, r) Is Nothing Then Exit Sub
v = r.Value
For i = 1 To 365
If Cells(i, 1) = v Then
Cells(i, 1).Select
Exit Sub
End If
Next
End Sub
Enter a date in cell B1 and you will scroll to that date in A1.
--
Gary''s Student - gsnu2007d
"QD" wrote:
I need help!
I have a spreadsheet with a calendar for all dates in a year. Total
four pages long. Now I am trying to create a Command button that will
help me find todays date or the date that I enter in a cell that I
want to go to, simply by entering date and clicking the command
button. Or enter the date that I am looking for in a cell and hit
enter. It will scroll upto that date in the spreasheet.
Thanks
|