hello all,
I have isolated a piece of code that seems to be giving me problems. I tried debugging with no luck. I believe the error lies in when im setting comp = . Any red flags come to mind when looking at my code ? Thanks in advance
Sub comp()
Dim comp_irange As Range
Dim comp_mrange As Range
Dim comp_mrange2 As Range
Dim comp As Variant
code......
If IsError(comp) Then
MsgBox "match not found"
Else
Set comp_irange = Sheets("MASTER").Range("C3:AF80")
Set comp_mrange = Sheets("MASTER").Range("A3:A80")
Set comp_mrange2 = Sheets("MASTER").Range("C1:AF1")
comp = Application.WorksheetFunction.Index(comp_irange, Application.WorksheetFunction.Match(name, comp_mragne, 0), Application.WorksheetFunction.Match(input_date, comp_mragne2, 0))
Sheets("PROMOTER_TEMPLATE2").Range("D16").Value = comp
End If
-Chris
Bookmarks