Dear Forum,
I'm having a bit of an issue with a script I'm writing, and I'm hoping that someone here can help. My issue is i'm getting a runtime error 13 Type Mismatch when I try to run my code. I think the issue lies in the fact that i want my script to be ran on every cell in the column because if i run my script on just one cell say "s2" it works just fine. However, when I expand the cell range reference to capture the entire oolumn I get the error. I read somewhere blank cells in the columns where my script is interacting with the data validation lists could create a problem, and it also could be that the compiler expects one data type, but is seeing another data type. Here's my code, hopefully someone can help me make sense of what i'm doing wrong. I've been working on this project for a week now, and this is the last hurdle to clear before it's completed. Any help you guys can give is greatly appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Intersect(Target, Range("q2:s1048576"))
If (Not Target Is Nothing) Then
Target.Offset(0, 1).Value = ""
End If
If Range("q2:q1048576").Value = "PLX" And Range("r2:r1048576").Value = "Imaging_TopCall" And Range("s2:s1048576").Value = "Missing From File" Then Range("u2:u1048576").Value = "Level 1"
ElseIf Range("q2:q1048576").Value = "Document" And Range("r2:r1048576").Value = "Assignment_Doc" And Range("s2:s1048576").Value = "Not Needed" Then
Range("u2:u1048576").Value = "Level 2"
ElseIf Range("q2:q1048576").Value = "Document" And Range("r2:r1048576").Value = "Assignment_Doc" And Range("s2:s1048576").Value = "Incorrect Investor" Then
Range("u2:u1048576").Value = "Level 1"
ElseIf Range("q2:q1048576").Value = "PLX" And Range("r2:r1048576").Value = "Inadequate Research" And Range("s2:s1048576").Value = "Research Not Followed" Then
Range("u2:u1048576").Value = "Level 1"
ElseIf Range("q2:q1048576").Value = "Document" And Range("r2:r1048576").Value = "Assignment_Doc" And Range("s2:s1048576").Value = "Data Integrity Error" Then
Range("u2:u1048576").Value = "Level 1"
End If
End Sub
Bookmarks