Maybe...
Option Explicit
Sub testme02()
Dim wks As Worksheet
Dim myCol As Range
Dim res As Variant
Dim FirstDate As Long
Set wks = ActiveSheet
Set myCol = wks.Range("C1").EntireColumn
FirstDate = CLng(Date)
res = Application.Match(FirstDate, myCol, 0)
If IsError(res) Then
res = Application.Match(FirstDate + 1, myCol, 0)
End If
If IsError(res) Then
MsgBox "Today and Tomorrow weren't found!"
Else
myCol.Cells(1)(res).Select
End If
End Sub
wrote:
Hi, I'd like to create a macro which selects the cell in a column which
is equal to Today() or the next date following.
I have set up a task list in Excel and Column C has a list of
historical and future dates. As I'm a novice, can anyone assist in
providing a macro to be this? I am playing around with the 'nextrow'
argument but not getting anywhere.
thanks
Nelson
--
Dave Peterson