+ Reply to Thread
Results 1 to 8 of 8

Setting the range, Type mismatch

  1. #1
    Registered User
    Join Date
    08-06-2019
    Location
    sacramento
    MS-Off Ver
    365
    Posts
    21

    Setting the range, Type mismatch

    Hi, I have this code, conditional formatting and it won't run because of the type mismatch error occurring.

    I tried dozen different expressions like ("1:2000", "A1, AZ2000", A1, A2000"....etc)

    I just can't figure it out why it is giving me the error

    between **** is the where it gives me the miss match error

    Please Login or Register  to view this content.
    Last edited by leewk114; 10-28-2019 at 07:58 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Setting the range, Type mismatch

    You would say
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-06-2019
    Location
    sacramento
    MS-Off Ver
    365
    Posts
    21

    Re: Setting the range, Type mismatch

    Thank you very much, i was able to fix that, but now it is giving me the mismatch again at "Set condition1 = ..." part, is it also because i missed something?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Setting the range, Type mismatch

    I would guess that
    Please Login or Register  to view this content.
    should be just
    Please Login or Register  to view this content.
    And please don't edit the original post. It can be confusing when the basis of discussion changes.

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,887

    Re: Setting the range, Type mismatch

    Your syntax is wrong in several places. You're actually getting a TypeMismatch because the returned object is a Databar, not a FormatCondition. Your formula also has too many brackets in it and there's no Entirerow property for a FormatCondition. Change the code to:

    Please Login or Register  to view this content.
    Rory

  6. #6
    Registered User
    Join Date
    08-06-2019
    Location
    sacramento
    MS-Off Ver
    365
    Posts
    21

    Re: Setting the range, Type mismatch

    Sorry about that, just wanted to update the current status did not realize it would cause confusion. but in all, Thank you for the help!

  7. #7
    Registered User
    Join Date
    08-06-2019
    Location
    sacramento
    MS-Off Ver
    365
    Posts
    21

    Re: Setting the range, Type mismatch

    Thank you for the help, now it works great! thank you for the help you all!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Setting the range, Type mismatch

    You're welcome.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. [SOLVED] Small Issue with Type Mismatch and Invalid Qualifier when setting variable value from cell
    By TomToms in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2014, 08:03 AM
  2. [SOLVED] combobox range - type mismatch !
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2014, 04:25 PM
  3. [SOLVED] Type Mismatch 13 - setting worksheet to another worksheet not working
    By nErD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2012, 08:40 AM
  4. Replies: 5
    Last Post: 07-27-2010, 10:58 AM
  5. [SOLVED] Setting range object--Type mismatch if template not used
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2006, 12:25 PM
  6. [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
  7. [SOLVED] Type mismatch on range name
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2005, 02:05 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