Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default 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   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Bennington View Post
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Count Non-Empty Cells In Each Row

=countif(range,"*")

=countif(A1:A10,"*")
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count no empty cells at the right of a selection avi Excel Programming 2 July 7th 11 10:44 PM
How to count non-empty cells SteveT[_2_] Excel Programming 2 October 9th 06 04:27 AM
Count Empty Cells in Range After Cells with Data David Excel Programming 16 September 17th 06 03:03 PM
count for empty cells tikchye_oldLearner57 Excel Discussion (Misc queries) 6 May 25th 06 08:41 PM
How do I count cells in spreadsheet that are not empty? Paul Excel Programming 1 October 11th 05 07:32 PM


All times are GMT +1. The time now is 12:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"