+ Reply to Thread
Results 1 to 6 of 6

Runtime Error 13 Mismatch can anyone help

  1. #1
    Forum Contributor
    Join Date
    09-14-2016
    Location
    Fareham UK
    MS-Off Ver
    2010
    Posts
    110

    Runtime Error 13 Mismatch can anyone help

    Hi Guys,

    I am having a runtime error 13 mismatch on the below code.

    It is meant to utilise the values in column A to create ranges in Sheet 2

    can anyone help

    1.ConcatenateABandRemoveAllValueswhichwillerror Should run through sheet 1 and create the names for soon to be ranges on sheet2.

    2. part of this also removes any random values such as (., spaces, brackets and so on) so as not to cause any conflicts.

    3. then it should use the values in A1 to create ranges on sheet2

    4. and then copy cells D & E into the range defined in A

    5. But it keeps on erroring and I dont know why, as everything that i have put in place should ensure that the ranges dont error.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Runtime Error 13 Mismatch can anyone help

    The error occurs in the 2nd line of

    Please Login or Register  to view this content.
    in procedure CopySheet1A1toSheet2NextCellInColumnA.

    The name isn't defined. It's looking at the header in Col A of sheet1.

    You really should learn basic debugging, it's an essential part of writing any code and will save your time.

  3. #3
    Forum Contributor
    Join Date
    09-14-2016
    Location
    Fareham UK
    MS-Off Ver
    2010
    Posts
    110

    Re: Runtime Error 13 Mismatch can anyone help

    HI Cytop,

    I am doing my best to learn as much as I can but still at a very early stage of learning VB.

    Do you know How I would resolve it?

    many thanks

    jamie

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Runtime Error 13 Mismatch can anyone help

    This error isn't VBA - it's a logic error so no learning required.

    Go check exactly what cell it is using (and its contents) to derive the name of the named range.

  5. #5
    Forum Contributor
    Join Date
    09-14-2016
    Location
    Fareham UK
    MS-Off Ver
    2010
    Posts
    110

    Re: Runtime Error 13 Mismatch can anyone help

    now its coming up with a syntax error

  6. #6
    Forum Contributor
    Join Date
    09-14-2016
    Location
    Fareham UK
    MS-Off Ver
    2010
    Posts
    110

    Re: Runtime Error 13 Mismatch can anyone help

    just realised to the name of the range should be defined Column A

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Type Mismatch Runtime Error
    By Jaeger in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2014, 10:49 AM
  2. RunTime Error 13: Type MIsmatch
    By tariq2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2013, 10:47 AM
  3. [SOLVED] Runtime Error '13' Type Mismatch
    By Rayneill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-08-2013, 01:03 AM
  4. [SOLVED] runtime error 13 type mismatch
    By chappie in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-30-2012, 10:12 PM
  5. runtime error 13 type mismatch
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2009, 11:15 PM
  6. Runtime Error 13 - type mismatch
    By hindlehey in forum Excel General
    Replies: 1
    Last Post: 11-07-2005, 10:55 AM
  7. Runtime Error '13': Type mismatch
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2005, 03:06 PM

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