+ Reply to Thread
Results 1 to 8 of 8

Countifs and/or Sumproduct Not Working

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    19

    Smile Countifs and/or Sumproduct Not Working

    I have tried every possible version of countif/countifs/sumproducts, etc to count the cells with the following criteria and all I get are errors or #VALUE!

    I am at my breaking point. All I want is excel to count the cells that meet the following criteria. The below is the last formula I tried. This should be simple but excel is not making it simple. PLEASE HELP!

    =SUMPRODUCT(Sheet1!AT3="1")*(Sheet1!AQ3<>"")*(Sheet1!AQ3<>"Only")*(Sheet1!AQ3<>"No")*(Sheet1!AQ3<>"Fitness")

    Greatly Appreciated!

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Countifs and/or Sumproduct Not Working

    Try another pair of brackets.

    =SUMPRODUCT((Sheet1!AT3="1")*(Sheet1!AQ3<>"")*(Sheet1!AQ3<>"Only")*(Sheet1!AQ3<>"No")*(Sheet1!AQ3<>"Fitness"))

    and is the Sheet1!AT3 value a text "1" or an actual number 1. If the latter remove the "".
    Dave

  3. #3
    Registered User
    Join Date
    07-03-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Countifs and/or Sumproduct Not Working

    The 1 is the latter, duh to me. Added the extra brackets. Making all those changes gave me a result of 871 which is better than what I had....but the result should be 841. I did AT3 and AQ3 as a test which did work but when I changed to count all cells in the two columns (AT3:AT1700 and AQ3:AQ1700) I got a total of 871 but should have been 841.

    I realized the "Only" is a custom number format of the #5 from a pivot table, the "No" is a #3 custom number format from a pivot table ad the "Fitness" is a #6 custom number format from a pivot table. So I changed the words to numbers to see if that would make a difference and received a total of 881. Still not the 841.

    In other,words, I created a pivot table with the information for this spreadsheet. Because pivot tables don't allow wording, I had to create a custom number format so that 5=Only, 3=No, and 6=Fitness. This is then transported to the excel spreadsheet. I tried the verbiage (ie: "No",etc) and received a result of 871. Then I tried the number (ie: 3,etc) and received a result of 881. Neither of which are giving me the actual result of 841.

    Then I removed the formulas in sheet1!AT thinking the custom format was causing the issue and still received a total of 871 not the 841 I need.

    It is getting closer.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Countifs and/or Sumproduct Not Working

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  5. #5
    Registered User
    Join Date
    07-03-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Countifs and/or Sumproduct Not Working

    It is not allowing me to attach the dummy report. As soon as I can I will attach.

    Sheet2 defines the search. I had to add one more criteria so the total should be 739. I removed the custom number format. The entire sheet1 will not have any formulas.
    Attached Files Attached Files
    Last edited by srsev; 06-27-2019 at 09:32 AM.

  6. #6
    Registered User
    Join Date
    07-03-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Countifs and/or Sumproduct Not Working

    I was able to attach the dummy report in my previous reply....yay!

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Countifs and/or Sumproduct Not Working

    841 Definitely
    Why would you want 739 as indicated on sheet2 ?

  8. #8
    Registered User
    Join Date
    07-03-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Countifs and/or Sumproduct Not Working

    When I added another criteria it brought the number down. But I was able to finally get it to work properly. So the first response from FlameRetired with the easy fixes helped out a lot to get it done and working properly.

+ 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] Countifs with or - but not as sumproduct
    By edost4 in forum Excel General
    Replies: 4
    Last Post: 10-11-2018, 09:45 AM
  2. Sumproduct vs countifs or Sumproduct + countifs
    By Xsample in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-01-2018, 02:16 PM
  3. [SOLVED] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  4. [SOLVED] CountIfS and SUMPRODUCT need help
    By rschoenb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2014, 11:21 PM
  5. [SOLVED] Sumproduct/countifs
    By mahat in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-21-2014, 10:30 PM
  6. [SOLVED] countifs working on extended ranges and different sheets not working
    By etaf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 02:23 PM
  7. Using SUMPRODUCT instead of COUNTIFS
    By SymphonyTomorrow in forum Excel General
    Replies: 12
    Last Post: 11-18-2011, 05:01 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