Results 1 to 6 of 6

Runtime Error 13 Type Mismatch

Threaded View

  1. #1
    Registered User
    Join Date
    03-14-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Runtime Error 13 Type Mismatch

    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
    Last edited by Vaibhav; 03-19-2012 at 08:19 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1