+ Reply to Thread
Results 1 to 16 of 16

cell.Formula.Countifs returninig false Or mismatch

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    cell.Formula.Countifs returninig false Or mismatch

    Good day,

    the below VBA formula returns a mismatch or a false, if I remove the later half of the formula it returns a false. I think the " + " is messing with the syntax and causing it to be mismatch. the -1 is to remove the header row that it counts.

    Please Login or Register  to view this content.

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

    Re: cell.Formula.Countifs returninig false Or mismatch

    You need to double up quotes in the formula string and you also need an = sign at the start:

    Please Login or Register  to view this content.
    Rory

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: cell.Formula.Countifs returninig false Or mismatch

    try this. you need to double up the quotes when used inside other quotes.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: cell.Formula.Countifs returninig false Or mismatch

    Thank you Rorya,

    However that issue has gone but now its not calculating and just returning 0, anythoughts?

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: cell.Formula.Countifs returninig false Or mismatch

    Impossible to say without seeing the data. But the fact that the formula does not return -1 would indicate that part of the formula is returning some value.

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

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

    Re: cell.Formula.Countifs returninig false Or mismatch

    Assuming you have calculation set to automatic, I can only assume that the counts actually are 0.

  7. #7
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: cell.Formula.Countifs returninig false Or mismatch

    Attached is the work book.
    Attached Files Attached Files

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

    Re: cell.Formula.Countifs returninig false Or mismatch

    I see 45 in G3.

  9. #9
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: cell.Formula.Countifs returninig false Or mismatch

    So it is adding an extra Space between the " and = looking like this " = " instead of "=".

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

    Re: cell.Formula.Countifs returninig false Or mismatch

    The code you have is not what I posted. You've got spaces in there for no apparent reason.

  11. #11
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: cell.Formula.Countifs returninig false Or mismatch

    that's something else, it returns on the info tab

  12. #12
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: cell.Formula.Countifs returninig false Or mismatch

    Its in the VBA editor, the actual formula is in there and places in into the cell, the cells will be cleared by another function later.

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

    Re: cell.Formula.Countifs returninig false Or mismatch

    Again, the code you have is not what I or Andy suggested. Remove the spaces before and after the = and <=

  14. #14
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: cell.Formula.Countifs returninig false Or mismatch

    As you suggested I placed the Double "" "" to void the mismatch, when removed I get a mismatch.

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    02-24-2012
    Location
    florida
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: cell.Formula.Countifs returninig false Or mismatch

    Disregard. Thanks everyone!

  16. #16
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: cell.Formula.Countifs returninig false Or mismatch

    Just looking with idle curiosity. You can simplify (and possibly correct) your code like this:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

+ 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] Run Time error 13, type mismatch on CountIfs
    By caabdul in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2018, 05:10 AM
  2. [SOLVED] Listbox Type Mismatch when retrieving formula from cell
    By impresxy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2017, 07:40 AM
  3. [SOLVED] =IF((COUNTIFS….FORMULA for TIME OVERLAP…ERROR 13 MISMATCH
    By vtnark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-28-2015, 01:17 PM
  4. Countifs Formula that show True/False results?
    By Kid Wonder in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-12-2013, 12:57 PM
  5. [SOLVED] Countifs() ignoring FALSE?
    By y_t in forum Excel General
    Replies: 1
    Last Post: 05-25-2012, 08:53 PM
  6. Formula bar/cell value mismatch
    By Steve_G_2 in forum Excel General
    Replies: 1
    Last Post: 11-29-2011, 12:59 AM
  7. Run time error 13 Type Mismatch pointing to Find MatchCase=false
    By NukedWhale in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2009, 11:53 PM

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