Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to set the current selection to an address on a row that contain
dates equal to the end of each monht and matches the current date on a data page (month ends muct match). The following code returns a type mismatch error. Can any one help Sub FindCurMonth() Dim CurLocation As Range Dim curDate As Range Set curDate = Range("B3") Set CurLocation = Rows(13).Find(What:=curDate.Value, _ After:=Cells(1), _ LookIn:=xlValues, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False) Dim rng As Range Set rng = Range(CurLocation.Address) Debug.Print (rng) If Not CurLocation Is Nothing Then Address = CurLocation.Address CurLocation.Select Else MsgBox "Not found" End If End Sub -- Jim |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to find out the cell location | Excel Discussion (Misc queries) | |||
Is it Possible to Find Shape at a Location (#find) for XL97? | Excel Programming | |||
find location max value in column | Excel Discussion (Misc queries) | |||
find cell location of max value in column | Excel Programming | |||
find location | Excel Programming |