ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting contents in aray (https://www.excelbanter.com/excel-discussion-misc-queries/206424-counting-contents-aray.html)

jpreman

Counting contents in aray
 
Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg. A1
:C10). I would like to know the combined count of alphabets "A" and "L". How
can I achieve this?

Tks

Preman

Bob Phillips[_3_]

Counting contents in aray
 
=SUM(COUNTIF(A1:C10,{"A","L"}))

--
__________________________________
HTH

Bob

"jpreman" wrote in message
...
Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg. A1
:C10). I would like to know the combined count of alphabets "A" and "L".
How
can I achieve this?

Tks

Preman




Gary''s Student

Counting contents in aray
 
=COUNTIF(A1:C10,"A")+COUNTIF(A1:C10,"L")

--
Gary''s Student - gsnu200807


"jpreman" wrote:

Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg. A1
:C10). I would like to know the combined count of alphabets "A" and "L". How
can I achieve this?

Tks

Preman


jpreman

Counting contents in aray
 
Thanks Bob,

You have taught me a different (better) solution than the one I figured out
within minutes of posting my question.

Kind regards

Preman

"Bob Phillips" wrote:

=SUM(COUNTIF(A1:C10,{"A","L"}))

--
__________________________________
HTH

Bob

"jpreman" wrote in message
...
Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg. A1
:C10). I would like to know the combined count of alphabets "A" and "L".
How
can I achieve this?

Tks

Preman





jpreman

Counting contents in aray
 
Hi

Thanks for responding to my post. That's exactly what I was looking for.

Kind regards

Preman

"Gary''s Student" wrote:

=COUNTIF(A1:C10,"A")+COUNTIF(A1:C10,"L")

--
Gary''s Student - gsnu200807


"jpreman" wrote:

Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg. A1
:C10). I would like to know the combined count of alphabets "A" and "L". How
can I achieve this?

Tks

Preman


jpreman

Counting contents in aray
 
Hi Bob,

I would be thankful if you kindly explain how curly brackets work in formulas.

Thanks & regards

Preman

"Bob Phillips" wrote:

=SUM(COUNTIF(A1:C10,{"A","L"}))

--
__________________________________
HTH

Bob

"jpreman" wrote in message
...
Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg. A1
:C10). I would like to know the combined count of alphabets "A" and "L".
How
can I achieve this?

Tks

Preman





Bob Phillips[_3_]

Counting contents in aray
 
Hi Preman,

The curly brackets signify an array constant, an array of values that will
be used within the formula. For instance, COUNTIF normally checks a range
against a particular value. If you use an array constant rather than a
particular value, COUNTIF will return an array of values equivalent to
multiple COUNTIF calls. The SUM is needed to sum this array returned by the
COUNTIF.

--
__________________________________
HTH

Bob

"jpreman" wrote in message
...
Hi Bob,

I would be thankful if you kindly explain how curly brackets work in
formulas.

Thanks & regards

Preman

"Bob Phillips" wrote:

=SUM(COUNTIF(A1:C10,{"A","L"}))

--
__________________________________
HTH

Bob

"jpreman" wrote in message
...
Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg.
A1
:C10). I would like to know the combined count of alphabets "A" and
"L".
How
can I achieve this?

Tks

Preman







jpreman

Counting contents in aray
 

That's great.

Thanks a million Bob.

Kind regards

Preman


"Bob Phillips" wrote:

Hi Preman,

The curly brackets signify an array constant, an array of values that will
be used within the formula. For instance, COUNTIF normally checks a range
against a particular value. If you use an array constant rather than a
particular value, COUNTIF will return an array of values equivalent to
multiple COUNTIF calls. The SUM is needed to sum this array returned by the
COUNTIF.

--
__________________________________
HTH

Bob

"jpreman" wrote in message
...
Hi Bob,

I would be thankful if you kindly explain how curly brackets work in
formulas.

Thanks & regards

Preman

"Bob Phillips" wrote:

=SUM(COUNTIF(A1:C10,{"A","L"}))

--
__________________________________
HTH

Bob

"jpreman" wrote in message
...
Thanks for reading this post.

One in each cell, there are several alphabets in a range of cells (eg.
A1
:C10). I would like to know the combined count of alphabets "A" and
"L".
How
can I achieve this?

Tks

Preman








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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com