ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   nth row or column counting (https://www.excelbanter.com/excel-worksheet-functions/242991-nth-row-column-counting.html)

monza_racer

nth row or column counting
 
I have a spreadsheet with two rows of data for each person (Row A and
Row B). I would like to COUNT or COUNTA every other cell that contains
data (or every nth cell) in a column, in this case I'd like to count
only the Row A cells that contain data. I know this can be done with
the SUM function, but I only want a count as the result, not a sum. I
tried altering the SUM formula structure, but it doesn't carry over to
COUNT or COUNTA functioning. Is there a formula to handle this, or
must a macro be developed? Thanks.

Bernie Deitrick

nth row or column counting
 
To count filled cells in column B that are on the odd rows:

=SUMPRODUCT((MOD(ROW(B2:B1000),2)=1)*(B2:B1000<"" ))

for the even rows

=SUMPRODUCT((MOD(ROW(B2:B1000),2)=0)*(B2:B1000<"" ))

HTH,
Bernie
MS Excel MVP


"monza_racer" wrote in message
...
I have a spreadsheet with two rows of data for each person (Row A and
Row B). I would like to COUNT or COUNTA every other cell that contains
data (or every nth cell) in a column, in this case I'd like to count
only the Row A cells that contain data. I know this can be done with
the SUM function, but I only want a count as the result, not a sum. I
tried altering the SUM formula structure, but it doesn't carry over to
COUNT or COUNTA functioning. Is there a formula to handle this, or
must a macro be developed? Thanks.





All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com