Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Focus on a cell based on date

I would like to have Excel 2003 on open move the focus to a cell
within a column based on the date opened so it reduces the need to
scroll down to find that date?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Focus on a cell based on date

Hi,
Put this code in the workbook section of the VBE.

Private Sub Workbook_Open()
Z = 1
Y = 1
Do Until Cells(Z, Y) = Date
Z = Z + 1
Loop
Cells(Z, Y).Select
End Sub

If your dates are not in column A, change the value of Y in the 2nd line to
suit your data. (Column A=1, Column B=2, etc)
Regards - Dave.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Focus on a cell based on date

When you save the file, make sure the focus is on the cell you want. Excel
will preserve the focus on reopen.

Regards,
Fred.

wrote in message
...
I would like to have Excel 2003 on open move the focus to a cell
within a column based on the date opened so it reduces the need to
scroll down to find that date?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default Focus on a cell based on date

in ThisWorkbook module put the following code

Private Sub Workbook_Open()
Dim l As Double
Range("A1:A10000").Select
l = DateSerial(Year(Now()), Month(Now()), Day(Now()))
k = Application.WorksheetFunction.Match(l, Selection, 0)
Cells(k, 1).Select
End Sub
Reply
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
On opening a worksheet move focus to a cell based on date davcas Excel Worksheet Functions 1 July 1st 08 02:18 PM
Active Cell/Focus Rich W. Excel Discussion (Misc queries) 6 March 19th 08 04:59 PM
Temporary formatting of cell with focus Ricter Excel Discussion (Misc queries) 5 August 31st 06 12:47 AM
Outline color of cell that has focus RobertC Excel Discussion (Misc queries) 1 July 15th 05 02:40 PM
Using formulas to determine date in one cell based on date in anot Gary Excel Worksheet Functions 2 November 22nd 04 08:11 AM


All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"