View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Go to cell with maximum value when worksheet opened

Assuming dates are contiguous in column A and latest date will be last entry

Private Sub Worksheet_Activate()
Me.Cells(Rows.Count, 1).End(xlUp).Select
End Sub

Right-click on the sheet tab and "View Code". Copy/paste the above into that
sheet module.

Edit the "1" to your column number.

Alt + q to return to Excel window.


Gord Dibben MS Excel MVP

On Sun, 13 Jul 2008 08:56:01 -0700, pignick
wrote:

I have a workbook containing a number of worksheets, some of which contain
weekly data extracted from a database and which are regularly updated, and
others perform various calculations on the data to produce reports and
graphs.

After updating the data I want to be able to visually check the latest week
of data entry in one of the worksheets, and am trying to write a macro that
will place the cursor on the first cell of the row containing the most recent
date (i.e. maximum date value) when the sheet is opened rather than having to
scroll down through an increasingly long column each time.

I have tried several things without success - I am new to macro writing -
can anyone help with a suggestion please? Thanks in anticipation.