Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On 10 Feb, 06:37, Gary''s Student
wrote: 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- Hide quoted text - - Show quoted text - Gary's Student, You are a genious!! Thanks a bunch. This works great if the dates in one column. I have set it up as a calendar by month. What I need to do to get the code to work. January SUN MON TUE WED THU FRI SAT 01/01/2008 01/02/2008 01/03/2008 01/04/2008 01/04/2008 01/05/2008 and so on. Thanks a million!!! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Gary,
Would it also be possible to get the target cell to scroll all the way to the top left corner of the screen, eg to "B2"'s position? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking Cell Once Data is entered | Excel Worksheet Functions | |||
Change color of cell when different cell has data entered | Excel Discussion (Misc queries) | |||
How do I prevent data from being entered into a particular cell? | Excel Discussion (Misc queries) | |||
data changes when entered into a cell | Excel Worksheet Functions | |||
retaining cell data once entered | New Users to Excel |