#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default sum in columns

I have a register where I have to Insert a "1" if student is present and this
adds up at bottom of column as usual.

If student is late I want to put "L" in the cell but I also want Excel to
add these along with the number "1" as well?#

Any ideas

Thanks

Steve King

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default sum in columns

On Jul 10, 9:22 am, K11ngy wrote:
I have a register where I have to Insert a "1" if student is present and this
adds up at bottom of column as usual.

If student is late I want to put "L" in the cell but I also want Excel to
add these along with the number "1" as well?#

Any ideas

Thanks

Steve King


counta should do the trick.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default sum in columns

This should do what you want.

=COUNTIF(A:A,1)+COUNTIF(A:A,"L")

HTH,
Paul

"K11ngy" wrote in message
...
I have a register where I have to Insert a "1" if student is present and
this
adds up at bottom of column as usual.

If student is late I want to put "L" in the cell but I also want Excel to
add these along with the number "1" as well?#

Any ideas

Thanks

Steve King



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default sum in columns

Another one:
=SUM(COUNTIF(A:A,{1,"L"}))

Although, I bet I'd use PCLive's.





K11ngy wrote:

I have a register where I have to Insert a "1" if student is present and this
adds up at bottom of column as usual.

If student is late I want to put "L" in the cell but I also want Excel to
add these along with the number "1" as well?#

Any ideas

Thanks

Steve King


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default sum in columns

On Jul 10, 10:01 am, Dave Peterson wrote:
Another one:
=SUM(COUNTIF(A:A,{1,"L"}))

Although, I bet I'd use PCLive's.

K11ngy wrote:

I have a register where I have to Insert a "1" if student is present and this
adds up at bottom of column as usual.


If student is late I want to put "L" in the cell but I also want Excel to
add these along with the number "1" as well?#


Any ideas


Thanks


Steve King


--

Dave Peterson


counta's simplier.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default sum in columns

COUNTA counts non-blank cells and will not produce accurate results if there
are other cells in the range that contain data other than 1's or L's, .


wrote in message
ups.com...
On Jul 10, 10:01 am, Dave Peterson wrote:
Another one:
=SUM(COUNTIF(A:A,{1,"L"}))

Although, I bet I'd use PCLive's.

K11ngy wrote:

I have a register where I have to Insert a "1" if student is present
and this
adds up at bottom of column as usual.


If student is late I want to put "L" in the cell but I also want Excel
to
add these along with the number "1" as well?#


Any ideas


Thanks


Steve King


--

Dave Peterson


counta's simplier.



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default sum in columns

On Jul 10, 10:43 am, "PCLIVE" wrote:
COUNTA counts non-blank cells and will not produce accurate results if there
are other cells in the range that contain data other than 1's or L's, .

wrote in message

ups.com...

On Jul 10, 10:01 am, Dave Peterson wrote:
Another one:
=SUM(COUNTIF(A:A,{1,"L"}))


Although, I bet I'd use PCLive's.


K11ngy wrote:


I have a register where I have to Insert a "1" if student is present
and this
adds up at bottom of column as usual.


If student is late I want to put "L" in the cell but I also want Excel
to
add these along with the number "1" as well?#


Any ideas


Thanks


Steve King


--


Dave Peterson


counta's simplier.


that wasn't in the specs.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default sum in columns

that wasn't in the specs.

Only the OP can tell but I expect that he might put a zero for a student who
is not present and that would make your formula incorrect whereas the 2
other solutions will work regardless.


--
Regards,

Peo Sjoblom




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default sum in columns

Sorry, but I have to disagree. The OP clearly stated he wanted to add up
the number of ones and "L"s in a range. He did not say there would or could
be anything else in the range (such as headings, subheadings, etc). So we
have to assume. Using the COUNTA function can produce the wrong results if
some of these other factors exist. But by using the COUNTIF function to
count exactly what you are looking for, you reduce the possibility of
incorrect results.


wrote in message
ups.com...
On Jul 10, 10:43 am, "PCLIVE" wrote:
COUNTA counts non-blank cells and will not produce accurate results if
there
are other cells in the range that contain data other than 1's or L's, .

wrote in message

ups.com...

On Jul 10, 10:01 am, Dave Peterson wrote:
Another one:
=SUM(COUNTIF(A:A,{1,"L"}))


Although, I bet I'd use PCLive's.


K11ngy wrote:


I have a register where I have to Insert a "1" if student is present
and this
adds up at bottom of column as usual.


If student is late I want to put "L" in the cell but I also want
Excel
to
add these along with the number "1" as well?#


Any ideas


Thanks


Steve King


--


Dave Peterson


counta's simplier.


that wasn't in the specs.



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
to convert columns to rows having mulit independent group columns Quacy Excel Worksheet Functions 1 August 22nd 06 11:20 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
Create stacked columns chart but with 2 columns for each x axis? PSM Charts and Charting in Excel 2 May 7th 05 03:56 PM
Pivot Table Creating New Columns that Subtract Two Existing Columns den4673 Excel Discussion (Misc queries) 3 December 17th 04 01:31 PM


All times are GMT +1. The time now is 09:36 AM.

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"