Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John,
Lookup FindNext in Help if you need to find more than one occurrence of today's date. Sub FindToday() Dim dateToday As Date Dim rngColB As Range Dim rngToFind As Range dateToday = Date With Sheets("Sheet1") Set rngColB = .Range("B:B") End With With rngColB Set rngToFind = .Find(What:=dateToday, _ After:=.Cells(.Cells.Count), _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False) End With If Not rngToFind Is Nothing Then 'insert your code here in lieu of 'following 2 lines if date found rngToFind.Select MsgBox "Found value" Else MsgBox "Did not find value" Exit Sub End If End Sub -- Regards, OssieMac |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
is there a formula that will subtract todays date from a hire date | Excel Worksheet Functions | |||
Making a date go red, if date passes todays date. | Excel Worksheet Functions | |||
Exel increment date problem wrt todays date. | Excel Worksheet Functions | |||
Create a button that will date stamp todays date in a cell | Excel Discussion (Misc queries) | |||
When I open my past invoice it keeps changing date to todays date | Excel Worksheet Functions |