+ Reply to Thread
Results 1 to 10 of 10

Formula to count different collumns, error.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Formula to count different collumns, error.

    I am trying to count tree different collumns with this formula: =COUNTIF(L4:L11+P4:P11+R4:R8;">0") ,but its showing error. I dont know why. Because there are intersected cells that i dont want to COUNT "L4:R8" won't work

    How to fix this formula?

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,352

    Re: Formula to count different collumns, error.

    Hi Mr. Castle

    Perhaps you need:

    =COUNTIF(L4:L11,">0")+COUNTIF(P4:P11,">0")+COUNTIF(R4:R8,">0")
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Formula to count different collumns, error.

    Now i see my mistake,


    Thank you Marvin

  4. #4
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Formula to count different collumns, error.

    Now I am trying to use this same formula but with "AVERAGEIF" and the result i am getting is wrong. Probably I canīt add using average, so AVERAGEIF(L4:L11,>0)+AVERAGEIF(P4:P11,">0") wont work.

    How to solve this problem?

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,352

    Re: Formula to count different collumns, error.

    Hi,

    Try:
    AVERAGEIFS(L4:L11,">0",P4:P11,">0")

    See:
    https://exceljet.net/excel-functions...geifs-function
    Last edited by MarvinP; 03-09-2019 at 09:45 PM.

  6. #6
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Formula to count different collumns, error.

    It shows "you entered too many arguments for this function". And its possible to add R4:R11 in this formula?
    Last edited by Mr.Castle; 03-09-2019 at 03:38 PM.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,422

    Re: Formula to count different collumns, error.

    You can use AVERAGEIFS where you have multiple conditions, but I don't think that is what you want, as the conditions are ANDed together, so that all cells on a corresponding row would have to be greater than zero to be included in the average calculation.

    Perhaps you need three SUMIF functions added together, and the result to be divided by three COUNTIF functions added together, similar to the formula in Post #2.

    Hope this helps.

    Pete

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,422

    Re: Formula to count different collumns, error.

    Sorry, I didn't give you the formula:

    =(SUMIF(L4:L11,">0")+SUMIF(P4:P11,">0")+SUMIF(R4:R11,">0")) / (COUNTIF(L4:L11,">0")+COUNTIF(P4:P11,">0")+COUNTIF(R4:R11,">0"))

    Hope this helps.

    Pete

  9. #9
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Formula to count different collumns, error.

    Good idea Pete.

    The formula worked,

    Thank you

+ 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. if error formula count event
    By louis128 in forum Excel General
    Replies: 14
    Last Post: 01-19-2019, 10:28 AM
  2. How to sort collumns?
    By zaopatrzeniowiec in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2016, 07:29 AM
  3. Replies: 1
    Last Post: 09-09-2014, 10:47 AM
  4. Devide two collumns - Error
    By taken in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-15-2014, 12:25 PM
  5. Replies: 3
    Last Post: 12-01-2009, 05:16 AM
  6. Totalling Collumns
    By Stormingerman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2005, 09:50 PM
  7. [SOLVED] Collumns and rows
    By smintey in forum Excel General
    Replies: 3
    Last Post: 02-15-2005, 02:06 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