Pulling out "a"

G

Gary Thomson

How do I count the number of times "a" appears within the
following:

UNAVAILABILITY
A B C D E ....
1 Unit 1-Feb 2-Feb 3-Feb 4-Feb ....
2 Maths a a
3 English a ab ab
4 Music abc b abcde
5 P.E.
6 Geography
7 History
8 Drama
9 Science a
.. .
.. .
.. .
 
G

Gary Thomson

Cheers Max, but is there a way that I can copy and paste
this formula down for "b", "c", "d", "e", etc, without
replacing the "a" manually everytime?
 
M

Max

Assuming you have in A11 downwards
A11: a
A12: b
A13: c
etc

Put in B11: =COUNTIF(B2:E9,"*"&A11&"*")
copy down
 
P

Peo Sjoblom

=COUNTIF($B$2:$E$9,"*"&CHAR(ROW(97:97))&"*")

will do it, copy down using the fillhandle until you reach 122 (z)
 
M

Max

oops, correction (missed out fixing the range B2:E9)

Put in B11: =COUNTIF($B$2:$E$9,"*"&A11&"*")
 
G

Gary Thomson

Cheers Max - Question though - why do we need the "*" -
what does the * actually do?
 
M

Max

The asterisk "*" is a wildcard, to search for anything joined with a target.
In your case, the targets are the letters a, b, c, etc within the range.
cheers.
 

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

Cell references 3
Extracting Data (Updated) 1
Extracting data 1
Extracting Data (Updated again example) 5
Cell References 6
Extracting Data (Updated) 2
Excel Help with dates 2
Scrabble Value calculation for Welsh words 0

Top