+ Reply to Thread
Results 1 to 6 of 6

Help with type mismatch..

  1. #1
    Registered User
    Join Date
    02-19-2015
    Location
    ottawa, canada
    MS-Off Ver
    2010
    Posts
    22

    Help with type mismatch..

    We have a client list with client numbers in column A.

    This macro is to be triggered upon change in column A,
    => check if there is a duplicate.
    => if duplicate
    => highlight and pop a message box
    => else
    => End macro

    Please Login or Register  to view this content.
    I currently get a type mismatch whenever I enter a value, and the Duplicate_Notify is fired even if no duplicates exist. Any help is greatly appreciated!

    Thanks!

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Help with type mismatch..

    I believe this line, which probably needs the Range added, will fire when there is one or more 1s.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-19-2015
    Location
    ottawa, canada
    MS-Off Ver
    2010
    Posts
    22

    Re: Help with type mismatch..

    Ok, so that fixed the type mismatch, but now it always fires off Duplicate_Identify and Duplicate_Notify even if no duplicates are found. What do I need to change to only fire those when duplicates are found?

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Help with type mismatch..

    If you think about it, you need to tell it to only fire if the countif evalutes to >1 ...

  5. #5
    Registered User
    Join Date
    02-19-2015
    Location
    ottawa, canada
    MS-Off Ver
    2010
    Posts
    22

    Re: Help with type mismatch..

    That was causing it not to fire.

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Help with type mismatch..

    Why are you only checking the number of 1s - should it be whatever is in the cell that has been changed?

+ 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. Run Type error 13 Type Mismatch
    By Affan Khan in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-13-2012, 12:58 PM
  2. [SOLVED] Run-type error 13 type mismatch
    By misop in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-05-2012, 04:08 AM
  3. Type mismatch
    By dgkindy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2009, 08:29 PM
  4. [SOLVED] Type Mismatch: array or user defined type expected
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2006, 10:45 AM
  5. [SOLVED] Type mismatch using rnge as Range with Type 8 Input Box
    By STEVE BELL in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-03-2005, 01:10 AM
  6. [SOLVED] Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 PM
  7. [SOLVED] Type Mismatch
    By Brad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2005, 12:06 PM
  8. [SOLVED] type mismatch here!
    By J_J in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2005, 12: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