I have tried to create a loop that gives me the runtime error 9. What I am tring to do is loop through Cells A8 through A100. The cells in this range are client initials. This is a list of client closing dates, that the order of clients changes every month. Only some clients have adhocs that I have to run. So what I would like the loop to do when it sees certain client the adhoc for that client populates in Column P. So as an example a client with the initials SPN is in cell A8 that client has two adhocs called "HMA CPT Rpt, Accrual Rpts". I have tried three different types of loops and I keep on getting the subscript error. Any help is appreciated.
Tom
Tom
Code:
Sub SetAdhocReports()
'
' SetAdhocReports Macro
Dim A()
Dim P()
Dim c As Variant
For Each c In Worksheets("ClientProcessing").Range("A8:A100").Cells
If c = "SPN" Then P(8) = "HMA CPT Rpt, Accrual Rpts"
Next
End Sub