+ Reply to Thread
Results 1 to 6 of 6

Adding countif formula. Is there a better way?

  1. #1
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Adding countif formula. Is there a better way?

    Hi All, In the attached workbook I have a formula in P3 that returns the correct result, its looking for how many times a person has the highest score in each column. I have a MAX formula in Row 53 to help.

    =COUNTIF(C3,C53)+COUNTIF(D3,D53)+COUNTIF(E3,E53)+COUNTIF(F3,F53)+COUNTIF(G3,G53)+COUNTIF(H3,H53)+COUNTIF(I3,I53)+COUNTIF(J3,J53)+COUNTIF(K3,K53)+COUNTIF(L3,L53)+COUNTIF(M3,M53)++COUNTIF(N3,N53)

    I'm just wondering if there is a better way of doing this?

    As always, any suggestions are much appreciated.
    Attached Files Attached Files
    Last edited by Marvo; 02-28-2024 at 07:06 AM.

  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
    80,882

    Re: Adding countif formula. Is there a better way?

    Why do you have ++ at the end of that formula?
    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
    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
    80,882

    Re: Adding countif formula. Is there a better way?

    Try this:

    =SUMPRODUCT((C3:N3<>"")*(C3:N3=C$53:N$53))
    Attached Files Attached Files

  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
    80,882

    Re: Adding countif formula. Is there a better way?

    Thanks for the rep.

  5. #5
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Adding countif formula. Is there a better way?

    Thanks Ali, that's fabulous, I guessed there had to be an easier way.

    I'd imagine my workbooks are full of formula that could be done better but I'm getting there, dabbled in VBA yesterday.

    It's the weather keeping me off the golf course, too much time on my hands.

    Thanks again.

  6. #6
    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
    80,882

    Re: Adding countif formula. Is there a better way?

    I was talking to a friend in the East Midlands whose club's course has been underwater for weeks. He says it's costing them more in maintenance than normal, yet the members are demanding refunds!!!

    I can well imagine that you have a lot of inefficient formulae, Marvo.

+ 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] Adding a COUNTIF function to a formula
    By davidanaya in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-21-2020, 07:39 AM
  2. Adding an IF to my COUNTIF formula??
    By TenMostWanted in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2019, 09:16 AM
  3. [SOLVED] Help adding countif to a formula
    By Ksun23 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2018, 04:40 PM
  4. Adding a COUNTIF function to an existing IF AND COUNTIF Formula...
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2018, 10:09 AM
  5. [SOLVED] Adding Indirect formula to a Countif
    By nikkilynn2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2014, 08:24 PM
  6. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  7. Adding a CountIF to a formula
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-01-2011, 07:24 AM

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