Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old April 17th 12, 07:20 PM
Junior Member
 
First recorded activity by ExcelBanter: Apr 2012
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  
Old April 17th 12, 07:26 PM
Senior Member
 
First recorded activity by ExcelBanter: Mar 2012
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  
Old 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
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:59 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017