Results 1 to 6 of 6

Excel VBA Runtime Error 13 - Type Mismatch

Threaded View

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Southwest
    MS-Off Ver
    Excel 2003
    Posts
    26

    Excel VBA Runtime Error 13 - Type Mismatch

    Hi all,

    I have a VBA script which is designed to conditional format certain cells based on another cells dropdown selection however every time i run it i get the runtime 13 error. Now i know the formula is a big one within this macro however i've been told this is the only way I can get excel to conditionally format using this formula. Can someone help?

    I am using excel 2003 if that helps anyone. Thanks

    Sub format()
    '
    ' format Macro
    ' Macro recorded 30/07/2013 by James Pite
    '
    ' Keyboard Shortcut: Ctrl+e
    '
        Range("D14:AZ20").Select
        Selection.FormatConditions.Delete
        Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(D$4>=VALUE(LEFT(INDEX($D$57:$AA$63,MATCH($C6,$C$57:$C$63,0),MATCH($A$13,$D$56:$AA$56,0)),FIND(" - ",INDEX($D$57:$AA$63,MATCH($C6,$C$57:$C$63,0),MATCH($A$13,$D$56:$AA$56,0)))-1)),D$4<=VALUE(MID(INDEX($D$57:$AA$63,MATCH($C6,$C$57:$C$63,0),MATCH($A$13,$D$56:$AA$56,0)),FIND(" - ",INDEX($D$57:$AA$63,MATCH($C6,$C$57:$C$63,0),MATCH($A$13,$D$56:$AA$56,0)))+1,255)))"
        With Selection.FormatConditions(1).Font
            .Bold = False
            .Italic = False
            .ColorIndex = 1
        End With
        Selection.FormatConditions(1).Interior.Pattern = xlNone
    End Sub
    I have asked this question on another forum which can be found here
    Last edited by mook25; 08-01-2013 at 06:48 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Runtime Error Type Mismatch
    By hungryhobo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2013, 08:50 PM
  2. Runtime Error 13 Type Mismatch
    By vtsoldier2010 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2012, 12:59 PM
  3. RunTime Error 13 and Type Mismatch...
    By TheNewGuy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-24-2010, 09:24 AM
  4. Runtime Error Type 13 Mismatch
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2006, 12:35 PM
  5. Runtime Error 13 - type mismatch
    By hindlehey in forum Excel General
    Replies: 1
    Last Post: 11-07-2005, 10:55 AM

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