+ Reply to Thread
Results 1 to 5 of 5

COUNTIFS & SUMIFS Not Grabbing Negative Values

  1. #1
    Registered User
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    69

    COUNTIFS & SUMIFS Not Grabbing Negative Values

    I am using the following formula to grab data for Table 1 from Table 2 (which is on a different page , but in the attached example they are on the same page).

    =IF(COUNTIFS(B$25:B$38,">=0",$I$25:$I$38,$A$1,$A$25:$A$38,$A6)>=1,SUMIFS(B$25:B$38,$I$25:$I$38,$A$1,$A$25:$A$38,$A6),"")

    It does well grabbing all data which are either 0 or they are positive, but negatives turn up as missing. I know that the ">=0" is the issue, but was having issues getting errors when that particular year did not have that particular holiday which is in cell A1.

    Any ideas!!!

    Jeff
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    51,297

    Re: COUNTIFS & SUMIFS Not Grabbing Negative Values

    You have specifically excluded values less than 0 by using the criteria ">=0"

    Why not just use...
    =SUMIFS(B$25:B$38,$I$25:$I$38,$A$1,$A$25:$A$38,$A6)

    If you dont want 0 to show, then adjust that to...
    =if(SUMIFS(B$25:B$38,$I$25:$I$38,$A$1,$A$25:$A$38,$A6)=0,"",SUMIFS(B$25:B$38,$I$25:$I$38,$A$1,$A$25:$A$38,$A6)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2013
    Posts
    8,192

    Re: COUNTIFS & SUMIFS Not Grabbing Negative Values

    instead of Countifs & Sumifs you can use
    =IFERROR(LOOKUP(1,1/($A$25:$A$38&$I$25:$I$38=$A6&$A$1),B$25:B$38)*1,"")
    Try this in B6 and copy across
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Banned User!
    Join Date
    10-29-2012
    Location
    Europe
    MS-Off Ver
    2013, 2016
    Posts
    318

    Re: COUNTIFS & SUMIFS Not Grabbing Negative Values


  5. #5
    Registered User
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: COUNTIFS & SUMIFS Not Grabbing Negative Values

    Quote Originally Posted by nflsales View Post
    instead of Countifs & Sumifs you can use
    =IFERROR(LOOKUP(1,1/($A$25:$A$38&$I$25:$I$38=$A6&$A$1),B$25:B$38)*1,"")
    Try this in B6 and copy across
    This works great Siva! The only issue that I am having is that if there is a blank cell it returns a zero. Is there a way to correct that?

    Jeff

+ 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. Formula help - COUNTifs, or SUMifs or?
    By jomu84sa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-16-2014, 05:27 AM
  2. [SOLVED] COUNTIFS and SUMIFS formula help
    By jmcole in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-05-2014, 07:56 PM
  3. [SOLVED] I can countifs a range but not sumifs
    By port in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-18-2014, 07:06 PM
  4. Sumifs, countifs 2007
    By somesoldiers in forum Excel General
    Replies: 1
    Last Post: 03-28-2011, 04:28 PM
  5. Sumifs and countifs
    By JohnGault82 in forum Excel General
    Replies: 3
    Last Post: 02-03-2011, 05:31 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