ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   countif is one way, any others? (https://www.excelbanter.com/excel-programming/273969-re-countif-one-way-any-others.html)

Frederick

countif is one way, any others?
 
Hi Cam

Supose you have the following in each of these cells

A B C
D E F G
Row 1 01/Jun 01/Jul 01/Aug
a b c d

Row 2 a a b
=COUNTIF($A2:$C2,E$2)
Row 3 b a c


Then put the formula into Cell D2 and drag over the Range from D2 to G3

this will set up a matrix which will return the values you require and
automatically make the correct references to the approporiate cells.

Now as you enter your codes under the dates in Columns A , B, C you will get
the correct count.

Hope I have put this into terms you can understand. It does work.

Good Luck Fred



"Cam" wrote in message
m...
. w x y z | a | b | c |
|---|---|---|
name 1 a a b c | 2 | 1 | 1 |
name 2 b a b | 1 | 2 | |
name 3 c a a a | 3 | | 1 |
name 4 b a b c | a | 2 | 1 |

Let's say w, x, y, z are dates, and a letter grade is given for tests
taken by students on those dates. Is there a more efficient method of
calculating how many of each letter grade each student has than what I
already have?

I'm using... =IF(COUNTIF(C3:f3,"a")=0,"",COUNTIF(C3:f3,"a")) [entered
in the "a" column, for example]. I already validate the entries for
the proper letters so that's okay.

It's not fancy but it works. It just doen't "look" too clean having
about 100 rows of names and 5 columns of letters.

Was wondering if there was a way to call a function or method to
calculate the counts or maybe just to clean up the formula a bit. Use
of Array?

Thanks





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

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