Results 1 to 8 of 8

Excel VBA Frustrating Run-time error '13' Type mismatch

Threaded View

  1. #1
    shastamccloud
    Guest

    Excel VBA Frustrating Run-time error '13' Type mismatch

    Hi everyone,

    I'm getting frustrated as heck trying to resolve an error 13 in my Macro Code in my Excel 2007 spreadsheet. I've read all about this error and understand that it's sometimes caused by mixing strings into math equations.

    The code is: (the error is the second line)
    If Executive.Cells(4, 14) > 0 Then
             Retirement.Cells(17, 7) = Retirement.Cells(17,6) / Executive.Cells(4, 14)
    The debugger says that the value of Retirement.Cells(17,6) is 76.692, and the value of Executive.Cells(4,14) is "". At first, I thought this error was caused by that Null value in (4,14), but this code works successfully in other spreadsheets with these values.

    Also, i guess I have a second question: If that value is Null, then how do that trigger this loop? I always assumes that Null was not considered greater than zero.

    BACKGROUND: this spreadsheet was produced as a report by an ASPX server. A spreadsheet is put on the server as a blank template, then the server fills it with data and downloads to the user.

    CROSSPOST: Hello everyone, I have crossposted this message at the following URL because I'm seeking help for a project that is due in a couple hours. If I get a response, I will post the answer at both sites and I will mark both as solved so I don't waste anybody's time or effort.


    http://www.mrexcel.com/forum/showthr...34#post2534334
    Last edited by shastamccloud; 12-06-2010 at 06:54 PM. Reason: I like

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