+ Reply to Thread
Results 1 to 2 of 2

"Run-Time Error '13' Type Mismatch"

Hybrid View

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Utah, United States
    MS-Off Ver
    Excel 2010
    Posts
    19

    "Run-Time Error '13' Type Mismatch"

    I am getting a "Run-Time Error '13' Type Mismatch" for the following code and I don't know what that means.

    Any help?

    '       Display Product Mix Data
            For X = 8 To neSales.Cells(8, 2).End(xlDown).Row
            If neSales.Cells(X, 2).Value = "%" _
            And Month(neSales.Cells(X, 1).Value) & "/" _
            & Day(neSales.Cells(X, 1).Value) & "/" _
            & Year(neSales.Cells(X, 1).Value) = SelectMonth.Value _
            Then
                Sales.PM1220.Value = neSales.Cells(X, 3).Value
                Sales.PM1630.Value = neSales.Cells(X, 4).Value
                Sales.PM2040.Value = neSales.Cells(X, 5).Value
                Sales.PM3050.Value = neSales.Cells(X, 6).Value
                Sales.PM4070.Value = neSales.Cells(X, 7).Value
                Sales.PM100M.Value = neSales.Cells(X, 8).Value
                Sales.PMTotal.Value = neSales.Cells(X, 9).Value
                Exit For
            Else
            End If
        Next

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: "Run-Time Error '13' Type Mismatch"

    Does it highlight the "%"?

    And shouldn't it be:
    Cells(8, 2).End(xlUp).Row
    You've no dimensioning in your program - you might want to write Option Explicit code!
    Last edited by xladept; 08-27-2012 at 07:49 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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