+ Reply to Thread
Results 1 to 13 of 13

Countif with too. many arguments

  1. #1
    Registered User
    Join Date
    11-30-2018
    Location
    Montreal, Canada
    MS-Off Ver
    Mac
    Posts
    5

    Countif with too. many arguments

    Hello,

    I want to do a COUNTIF formula but every time I try entering it, it tells me I have too many arguments.

    Here is what I want to enter: =(COUNTIF(J2,L2,N2,P2,R2,T2,V2,X2,Z2,AB2,AD2,AF2,AH2,AJ2,AL2,AN2,AP2,AR2,AT2,"Yes"))/19

    I basically want to calculate the percentage of times "Yes" appears from the selected cells.

    Can anyone suggest what I need to do here to correct the formula?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Countif with too. many arguments

    Welcome to the forum!

    Your syntax is incorrect. You need to define a range, not a list of cell references:

    =COUNTIF(J2:AT2,"Yes")/19
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-30-2018
    Location
    Montreal, Canada
    MS-Off Ver
    Mac
    Posts
    5

    Re: Countif with too. many arguments

    But that's just the thing - the cells I need calculated aren't in a range. It is every other cell.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Countif with too. many arguments

    So what is in the cells you don't want to include? The problem is you can't use COUNTIF in the way you want.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Countif with too. many arguments

    It will be easier to advise if you attach the workbook.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  6. #6
    Registered User
    Join Date
    11-30-2018
    Location
    Montreal, Canada
    MS-Off Ver
    Mac
    Posts
    5

    Re: Countif with too. many arguments

    I'm analyzing several data points per category.

    In this case, the categories are SEO (in blue), Website (in orange), etc.

    Each data point has two columns. One for the first analysis - and one for the "Second Wave" later in the year. That's why I can't create the COUNTIF in a single range.
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Countif with too. many arguments

    Sorry - I should have been more specific. An empty workbook is of no use whatsoever.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

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

    Re: Countif with too. many arguments

    The YES(s) in cell AV2 need to be in quotes.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  9. #9
    Registered User
    Join Date
    11-30-2018
    Location
    Montreal, Canada
    MS-Off Ver
    Mac
    Posts
    5

    Re: Countif with too. many arguments

    Ok - so the file called "Dummy Data" was my initial document. The first worksheet in this document was the "first wave" (my first evaluation). The second worksheet was the second evaluation. My objective is to merge the two worksheets into a single one.

    So what I came up with is the "Digital Assessment Pipeline Q1 2019" document. Where Wave 1 and Wave 2 would be included in a single workbook, as two separate columns under a merged cell header.
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Countif with too. many arguments

    Sorry - the workbooks don't bear any relationship to the original question, so I cannot even begin to try to resolve this for you. I hope someone else will be able to make the connection.

  11. #11
    Registered User
    Join Date
    11-30-2018
    Location
    Montreal, Canada
    MS-Off Ver
    Mac
    Posts
    5

    Re: Countif with too. many arguments

    This is actually perfect. I'm looking for a percentage, so I'll do

    =(SUMPRODUCT((J2="YES")+(L2="YES")+(N2="YES")+(P2="YES")+(R2="YES")+(T2="YES")...))/19

    Thank you both!

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Countif with too. many arguments

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

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

    Re: Countif with too. many arguments

    You are welcome. If you are still here this is a shorter formula. It is volatile so if you have thousands of them they will slow the workbook down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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] Countif/sumif too many arguments :d
    By rlowe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-04-2013, 10:30 PM
  2. COUNTIF to many arguments
    By Nick.123 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 05-03-2011, 01:56 PM
  3. countif with two arguments
    By cojast in forum Excel General
    Replies: 4
    Last Post: 07-01-2008, 12:42 PM
  4. Problems with IF, COUNTIF, arguments, etc.
    By Bemidji in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-13-2008, 06:57 AM
  5. [SOLVED] COUNTIF arguments
    By Rich in forum Excel General
    Replies: 3
    Last Post: 12-09-2005, 12:15 PM
  6. [SOLVED] How do I set up an array using countif for 2 separate arguments.
    By Aladin Akyurek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 02:05 PM
  7. [SOLVED] =COUNTIF How to if 2 or more arguments???
    By Trixie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2005, 04:06 PM
  8. countif with 3 arguments?
    By JENNYC in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-08-2005, 05:55 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