Loading

Got a version of Excel that uses the
menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)?
**This site is for you!** If you
use a later version of Excel, visit
our *ExcelTips* site focusing on the ribbon interface.

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.

Learn more about Allen...

ExcelTips FAQ

ExcelTips Resources

Ask an Excel Question

Make a Comment

Free Business Forms

Free Calendars

** Please Note:** This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later),

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 (2421) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Counting Only Money Winners.

*Related Tips:*

**Save Time and Supercharge Excel!** Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out *Excel 2010 VBA and Macros* today!

@Robin,

"NO COMMENT" !!!!!!!!!!!!!!!!!!

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

"NO COMMENT" !!!!!!!!!!!!!!!!!!

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

My bad, you are obviously much more knowledgeable in excel than I am and can't be expected to spend time with someone who isn't at your level.

Just so you know, your formula doesn't work like a charm as its still giving me a total of 41 and the correct answer is 21.

but thanks anyway

Just so you know, your formula doesn't work like a charm as its still giving me a total of 41 and the correct answer is 21.

but thanks anyway

@Robin,

If you didn't understand what I meant in the: 21 X $2.00 = $42.00, then we have a Communication Breakdown.

You will have to wait for someone else's response.

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

If you didn't understand what I meant in the: 21 X $2.00 = $42.00, then we have a Communication Breakdown.

You will have to wait for someone else's response.

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

Yes but I am not looking for it to multiply what is in the cells, I am looking for it to add the number of cells that have a $value in them. Again, not looking for a sum or product of the value in the cells. Only looking for it to count the actual cells that do not have a formula/or ones with the $.

this number is 21.

do you have a formula that will do this?

Again, I do appreciate your help!

this number is 21.

do you have a formula that will do this?

Again, I do appreciate your help!

@Robin,

If you have 21(!) cells - with each having the amount of $2.00 - to my opinion 21 X $2.00 = $42.00 and nothing else.

The ARRAY FORMULA, I have provided you,

{=SUM((MOD(ROW(G9:G50),2))*G9:G50)}

works like a charm.

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

If you have 21(!) cells - with each having the amount of $2.00 - to my opinion 21 X $2.00 = $42.00 and nothing else.

The ARRAY FORMULA, I have provided you,

{=SUM((MOD(ROW(G9:G50),2))*G9:G50)}

works like a charm.

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

HI!

I typed in the formula with my applicable fields and it totaled 41 the cells not just the ones with $. the spreadsheet cells i am working with are g9:g50. Every other cell has a currency amount and every other cell has a formula using the cell above to get a calculation. ex g10 formula is g9*k9.

$2.00 g9

104 g10

$2.00 g11

52 g12

i want it to add the cells with the $ which should add up to 21 because there are 42 cells. the total i got was 41 with {=SUM((MOD(ROW(g9:g50),2))*g9:g50)}

What am i doing wrong? Thank you so much for your help.

I typed in the formula with my applicable fields and it totaled 41 the cells not just the ones with $. the spreadsheet cells i am working with are g9:g50. Every other cell has a currency amount and every other cell has a formula using the cell above to get a calculation. ex g10 formula is g9*k9.

$2.00 g9

104 g10

$2.00 g11

52 g12

i want it to add the cells with the $ which should add up to 21 because there are 42 cells. the total i got was 41 with {=SUM((MOD(ROW(g9:g50),2))*g9:g50)}

What am i doing wrong? Thank you so much for your help.

@Robin,

Try the following Array Formula:

{=SUM((MOD(ROW(A1:A100),2))*A1:A100)}

Array formulas are entered using CSE (<Ctrl+Shift+Enter>), instead of the a regular <Enter>. This will enclose the formula in curly brackets, which SHOULD NOT be typed manually.

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

Try the following Array Formula:

{=SUM((MOD(ROW(A1:A100),2))*A1:A100)}

Array formulas are entered using CSE (<Ctrl+Shift+Enter>), instead of the a regular <Enter>. This will enclose the formula in curly brackets, which SHOULD NOT be typed manually.

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

I have a spreadsheet that has currency in every other cell in a column. the other cells are numbers. I only want to add the number of cells that host the currency numbers. Can I do this?

ex. a1 $40.00

a2 10.00

a3 $25.00

a4 15.00

a2 and a4 are formulas

thanks!!

ex. a1 $40.00

a2 10.00

a3 $25.00

a4 15.00

a2 and a4 are formulas

thanks!!