Looking for intersection
slight correction assuming classes is a named range:
To eliminate the evaluate:
Sub ABCDEF()
Dim cnt as Long, rng as Range
cnt = Application.CountA(Range("Classes")) + 1
With ActiveSheet
Set rng = .Range("A1").Offset( _
Application.Match(.Range("AF3").Value, .Range("A1").Offset( _
Application.Match(.Range("AE3"), .Range("A:A"), 0) - 1, 0) _
.Resize(cnt, 1), 0) - 1 + .Range("A1").Offset(Application.Match( _
.Range("AE3"), .Range("A:A"), 0) - 1, 0).Row - 1, _
Application.Match(CLng(Date), .Rows(2), 0) - 1)
End With
MsgBox rng.Address
End Sub
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
To eliminate the evaluate:
Sub ABCDEF()
Dim cnt as Long, rng as Range
cnt = Application.CountA(Classes) + 1
With ActiveSheet
Set rng = .Range("A1").Offset( _
Application.Match(.Range("AF3").Value, .Range("A1").Offset( _
Application.Match(.Range("AE3"), .Range("A:A"), 0) - 1, 0) _
.Resize(cnt, 1), 0) - 1 +
..Range("A1").Offset(Application.Match( _
.Range("AE3"), .Range("A:A"), 0) - 1, 0).Row - 1, _
Application.Match(CLng(Date), .Rows(2), 0) - 1)
End With
MsgBox rng.Address
End Sub
--
Regards,
Tom Ogilvy
"David" wrote in message
...
David wrote
Seems to work in my limited testing.
had to adjust to counta(Classes)+1 to get to last class in the list.
--
David
|