View Single Post
  #2   Report Post  
Spencer101 Spencer101 is offline
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....