PDA

View Full Version : Counting Items


Amyunimus
Oct 26, 2007, 10:01 AM
If a variable in column A fulfills a certain condition, I have it listed in column B

Column A


Q
W
E
R
T
Y
C
O
M
P
U
T
E
R

If the letter is a vowel, I want to list it in column B ( = if(A1=vowel,A1,"") (this isn't the exact formula-- I know this wouldn't work-- but it's just for the idea)

So in Column B I get



E


Y

O


U

E


..with blank ("") cells between.


How can I count these items in the next column? I want:


E 1


Y 2

O 3


U 4

E 5


without the blank cells in between counted.

Any suggestions?

Thanks.

mdosh01
Dec 9, 2007, 08:44 PM
In column C, row 1 enter the formula:

=IF(B4="","",COUNTA($B$4:B4))

Copy this formula into cells C1 through C14 (through letter "R"). The final cell should be:

=IF(B17="","",COUNTA($B$4:B17))

Let me know if it doesn't work for you.