Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi folks,
following code works somtimes, sometimes it doesn't: Dim foundRange As Range, dateRange As Range Dim cellAddr As String, dateVal As Date, workingDay As String workingDay = "02.05.07" Set dateRange = ThisWorkbook.Worksheets("Mai").Range("D5:D36") With dateRange Set foundRange = .Find(what:=format(workingDay, "d") , _ LookIn:=xlValues, _ searchorder:=xlColumns, _ SearchDirection:=xlNext, _ LookAt:=xlPart) Do If foundRange Is Nothing Then Exit Do ' emergency exit dateVal = foundRange.Value Set foundRange = .FindNext(foundRange) Loop Until dateVal = workingDay ' go 4it until found End With ' search within a range Any ideas ?? Thanx for help chfa |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ActiveX Control Text Rendering Oddly | Excel Discussion (Misc queries) | |||
Works spreadsheet-find circular ref. | Excel Worksheet Functions | |||
Select Case Behaving Oddly | Excel Programming | |||
OFFSET behaving oddly | Excel Worksheet Functions | |||
=ISODD Behaving Oddly | Excel Programming |