Thread: CountIF
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default CountIF

See response in .worksheet.functions

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gee-off" wrote in message
...
A B C
1 S6 B2

I know how to use the countif function as if to count all values that

equal
"S*" (value beginning with "S" only regardless of the following number) in

a
row. Then tally, per row, the number of times "S*" appeared in the range.
The formula for "C1" would be: =countif(A1:B2,"S*") which right now

would
return the value of 1. Now what I want to do is in addition to this

formula,
I want "C1" to also calculate the countif portion and then multiply the
countif returned value by the second number in the stated cell. i.e. A1

=
S6, so "C1" has a value of "1", now mulitply the "1" by the second digit

in
"A1" (which is 6). How would I go about this? Thanks.

Gee-off


"Tom Ogilvy" wrote:

In general, each would have to be handled separately, but if the

intervening
cells would not contain an X, then you wouldn't need to exclude them to

get
the count.

=Countif(A3:A6,"X")+Countif(A9:A12,"X")+Countif(A1 5:A18,"X")

--
Regards,
Tom Ogilvy


"Arturo" wrote in message
...
=COUNTIF(A3:A6,"X")

Returns the correct # of Xs in that range.
How do I incorporate additional non-contiguous ranges into that

formula
correctly, such as A3:A6,A9:A12,A15:A18?

Sincerely,
Arturo