Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Counting Only Money Winners.

Counting Only Money Winners

Written by Allen Wyatt (last updated April 23, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Chuck has a worksheet with prize monies to be awarded to the eighty players in his golf league. Each row represents a player, and each column represents the winners of each of the five tournaments held in the season. The sixth column contains a simple formula summing the winnings shown on each row. At the bottom of this sixth column Chuck wants to enter a function that would count the number of players actually receiving monetary awards.

There are several ways you can put together such a formula. You might be tempted to use the COUNTA function, but it won't work. The purpose of COUNTA is to count all the cells that are not empty. This means it will also count cells containing a zero value; they are not empty either.

You could use the SUMPRODUCT function in the following manner:

=SUMPRODUCT((G1:G80>0)*1)

This formula just checks if a cell is greater than zero. If it is, then the True value is multiplied by 1 resulting in a value of 1. If it is False, then the False value multiplied by 1 is 0. The sum of all these values (1 and 0) is then calculated, resulting in a count as desired.

Perhaps the easiest approach, however, is to use the COUNTIF function. This function performs a count only if a particular criteria is met:

=COUNTIF(G1:G80,">0")

In this case, the count only occurs if a cell is greater than zero.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12103) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Counting Only Money Winners.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Making VLOOKUP Trigger a Macro

VLOOKUP is an oft-used worksheet function to lookup values in a data table. If the function cannot return a value, it ...

Discover More

Index Number for the Active Table

For some programming needs, it is important to determine the index of an object within a collection of such objects. This ...

Discover More

Creating a Dynamic Hyperlink

Want to create a hyperlink that will always display a different worksheet in your workbook? There are several ways to do ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Keeping a Max Value in a Cell

Sometimes it is helpful to have a cell contain the maximum value that has ever occurred within changing data. This tip ...

Discover More

Combining Cell Contents

Excel allows you to easily combine text together. Interestingly, it provides two ways you can perform such combinations. ...

Discover More

Adding Up Tops and Bottoms

When you are working with sequenced values in a list, you’ll often want to take some action based on the top X or ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is five more than 3?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.