Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
662 views
in Technique[技术] by (71.8m points)

excel - How to define a non continuous range in COUNTIF

   A    B   C

1  Β        Β
2  Β        Β
3  Α        Α
4  Α        Α
5  Β        Β
6  Α        Α
7  Α        B
8  Β        Β
9  Β        Β
10 Α        Α
11 Β        A
12 Α        Α
13 Α        Α
14 Β        Β
15 Α        Α
16 Β    ??  

In cell B16 I want to count how many "B"s (the value in A16) are in cells C1:C15 and A16. Then using some function I will put an "A" or "B" in cell C16. How can I give such a range in COUNTIF? The same formula must be used for every cell in column B.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Here's the formula for cell B16: =SUM(COUNTIF(INDIRECT({"C1:C15","A16"}),"B"))


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...