+ Reply to Thread
Results 1 to 4 of 4

Or function within a countifs statement

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    5

    Or function within a countifs statement

    I almost have this formula where i need it, but for some reason i am getting caught up with this OR function.

    This was my original Formula: =COUNTIFS('Data Entry'!G2:G999, "DVR (bus)",'Data Entry'!B2:B999,"<="&'System Uptimes'!A4,'Data Entry'!C2:C999,">="&'System Uptimes'!A4)

    This is what i am trying with the OR:
    =COUNTIFS('Data Entry'!G2:G999, "DVR (bus)",'Data Entry'!B2:B999,"<="&'System Uptimes'!A4,'Data Entry'!C2:C999,OR(">="&'System Uptimes'!A4,ISBLANK('Data Entry'!C2:C999)))

    I had some test values in my "Data Entry" sheet and my formula was evaluating to 2, which was almost right, but i also needed this OR and ISBLANK function to check for empty cells. Whenever i use this formula with the OR in it, my output goes to 0. With the examples i have in my Data Entry Sheet the OR should be adding another count, so i should evaluate to 3. It seems to me like the OR is acting like an AND in this case.

    Thanks in advance for the help.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Or function within a countifs statement

    Try

    =SUMPRODUCT(('Data Entry'!G2:G999="DVR (bus)")*('Data Entry'!B2:B999<='System Uptimes'!A4)*(('Data Entry'!C2:C999>='System Uptimes'!A4)+(ISBLANK('Data Entry'!C2:C999))))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Or function within a countifs statement

    as far as I know contifs() clauses are ANDS,

    split the countifs adding them together,

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-28-2013
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Or function within a countifs statement

    The SUMPRODUCT function did the trick. thanks a lot!

+ 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.6.0 RC 1