+ Reply to Thread
Results 1 to 8 of 8

Thread: find_name VB script returns error 13 type mismatch in Excel 2010

  1. #1
    Registered User
    Join Date
    01-25-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    5

    find_name VB script returns error 13 type mismatch in Excel 2010

    Is there something wrong with the code?

    Sub find_name()
    Dim name_list As Range, c As Range, d As Range, lookup_list As Range
    Worksheets("name list").Activate
    Set name_list = Range(Range("A2"), Range("A2").End(xlDown))
    Worksheets("Sheet1").Activate
    Set lookup_list = Range(Range("A2"), Range("A2").End(xlDown))
    For Each c In lookup_list
        For Each d In name_list
            If InStr(UCase(c.Value), UCase(d.Value)) Then c.Interior.ColorIndex = 6
        Next d
    Next c
    End Sub
    Last edited by hoshangc@yahoo.com; 01-26-2012 at 02:41 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: find_name VB script returns error 13 type mismatch in Excel 2010

    I would be easier if you post a sample workbook.
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  3. #3
    Registered User
    Join Date
    01-25-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: find_name VB script returns error 13 type mismatch in Excel 2010

    How would you like me to do that?

  4. #4
    Registered User
    Join Date
    01-25-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: find_name VB script returns error 13 type mismatch in Excel 2010

    sample 1-25-12.xlsm

    Attached is the requested sample file.

  5. #5
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: find_name VB script returns error 13 type mismatch in Excel 2010

    hum..... what is your question again? I see you have some codes, but I can't read your mind.
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  6. #6
    Registered User
    Join Date
    01-25-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: find_name VB script returns error 13 type mismatch in Excel 2010

    For some reason when I run the macro in the previously attached sample xlsm, I get error 13 type mismatch. Can you please help?

  7. #7
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: find_name VB script returns error 13 type mismatch in Excel 2010

    I meant what is the macro trying to do. It is taking forever for the macro to complete. Not saying I have a slow computer, but it is still running.
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  8. #8
    Registered User
    Join Date
    01-25-2012
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: find_name VB script returns error 13 type mismatch in Excel 2010

    It is supposed to highlight all the words in column A of 'name sheet' in 'Sheet1'

+ Reply to Thread

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.2.0