Help with Formula

K

Kylie

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I want to know if it's possible to add up cells that contain a letter instead of a number, or do I need to convert all the letter's to numbers first?

Basically I'm trying to calculate attendance records and the database that was generated marks the people as P for present or A for absent. I want to calculate their total attendance by adding the P's only. Is that possible?

Please help.
 
J

JE McGimpsey

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I want to know if it's possible to add up cells that contain a letter instead
of a number, or do I need to convert all the letter's to numbers first?

Basically I'm trying to calculate attendance records and the database that
was generated marks the people as P for present or A for absent. I want to
calculate their total attendance by adding the P's only. Is that possible?

One way:

=COUNTIF(A1:A10,"P")
 
R

richardf

I want to know if it's possible to add up cells that contain a letter instead of a number, or do I need to convert all the letter's to numbers first?
Basically I'm trying to calculate attendance records and the database that was generated marks the people as P for present or A for absent. I want to calculate their total attendance by adding the P's only. Is that possible?

Please help.

The formula countif(range,condition) does this neatly.
At the bottom of your attendances column, you need a cell
with the formula countif(range,"P") - the inverted commas are necessary! the range will be the first and last cells in the attendance column - something like A1:A40. Hope this helps. Also, look up
"countif" in your excel Help to find the syntax for the formula..
 
C

Carl Witthoft

What's an "inverted comma"? (what us normal folk call "quotation
mark"?)

Back on topic - just thought it worth mentioning that the countif() as
presented in previous responses only works so long as thecells in
column A contain exactly "P" as opposed to, e.g., "Pass" or "I think P."

In the more general case, you'll need to use something along the lines
of count(if(isnumber(find([range],"P")))) as an array formula.



I want to know if it's possible to add up cells that contain a letter
instead of a number, or do I need to convert all the letter's to numbers
first?

Basically I'm trying to calculate attendance records and the database that
was generated marks the people as P for present or A for absent. I want to
calculate their total attendance by adding the P's only. Is that possible?

Please help.

The formula countif(range,condition) does this neatly.
At the bottom of your attendances column, you need a cell
with the formula countif(range,"P") - the inverted commas are necessary! the
range will be the first and last cells in the attendance column - something
like A1:A40. Hope this helps. Also, look up
"countif" in your excel Help to find the syntax for the formula..[/QUOTE]
 
J

JE McGimpsey

Carl Witthoft said:
What's an "inverted comma"? (what us normal folk call "quotation
mark"?)

"Normal folk" in Britain use "inverted commas" to denote a quotation.

"Normal folk" here in the US usually assume that everyone else uses the
same terms we do.

Gets us in trouble sometimes...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top