Remember Me?

#1
April 17th 12, 07:20 PM
 Junior Member First recorded activity by ExcelBanter: Apr 2012 Posts: 1
Count Non-Empty Cells In Each Row

I have a spreadsheet where each row consists of the name of a particular election candidate in the first column, then a space where I want a formula, and then each column after that contains the name of a voter, or nothing, if that voter didn't vote for that candidate. There are around 350 candidates and 22 voters.

I want to write a formula in the second column that will count the number of non-empty cells to its right in the row, thus counting the number of votes that candidate received.

While COUNTA(C2:X2) works just fine for the first row, I'd have to retype those numbers 350 times.

Is there any way I can make the formula refer only to the row that the formula is in, excluding the formula and the name of the candidate, of course? That way, I could place the same formula in each row. Help is appreciated.

EDIT: Solved my own problem. Didn't realize Excel adjusts cell numbers when you copy/paste.

Last edited by Bennington : April 17th 12 at 07:28 PM

#2
April 17th 12, 07:26 PM
 Senior Member First recorded activity by ExcelBanter: Mar 2012 Posts: 663

Quote:
 Originally Posted by Bennington I have a spreadsheet where each row consists of the name of a particular election candidate in the first column, then a space where I want a formula, and then each column after that contains the name of a voter, or nothing, if that voter didn't vote for that candidate. There are around 350 candidates and 22 voters. I want to write a formula in the second column that will count the number of non-empty cells to its right in the row, thus counting the number of votes that candidate received. While COUNTA(C2:X2) works just fine for the first row, I'd have to retype those numbers 350 times. Is there any way I can make the formula refer only to the row that the formula is in, excluding the formula and the name of the candidate, of course? That way, I could place the same formula in each row. Help is appreciated.
=COUNTA(C2:X2) WILL only refer to that row. As you copy it down it will change to =COUNTA(C3:X3) then =COUNTA(C4:X4) etc....
#3
September 21st 18, 07:40 AM posted to microsoft.public.excel.worksheet.functions
 external usenet poster First recorded activity by ExcelBanter: Sep 2018 Posts: 1
Count Non-Empty Cells In Each Row

=countif(range,"*")

=countif(A1:A10,"*")

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

 Similar Threads Thread Thread Starter Forum Replies Last Post avi Excel Programming 2 July 7th 11 10:44 PM SteveT[_2_] Excel Programming 2 October 9th 06 04:27 AM David Excel Programming 16 September 17th 06 03:03 PM tikchye_oldLearner57 Excel Discussion (Misc queries) 6 May 25th 06 08:41 PM Paul Excel Programming 1 October 11th 05 07:32 PM

All times are GMT +1. The time now is 03:47 AM.