View Single Post
  #1   Report Post  
Bennington Bennington is offline
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