Totally stumped here.
I have a table which contains records in each row.
<table>
<tr><td></td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr>
<tr><td>1</td><td>Name</td><td>Item1</td><td>Item2</td><td>Item3</td><td>Item4</td></tr>
<tr><td>2</td><td>Bob</td><td>Book</td><td>Shirt</td><td>Book</td><td>Pen</td></tr>
<tr><td>3</td><td>Joe</td><td>Pen</td><td>Shoe</td><td>[ ]</td><td>Ring</td></tr>
<tr><td>4</td><td>Ann</td><td>Book</td><td>[ ]</td><td>Shirt</td><td>Pen</td></tr>
<tr><td>5</td><td>Bill</td><td>Shoe</td><td>Shirt</td><td>Ring</td><td>Book</td></tr>
</table>
*Note: Some cells will be empty.
I want to count how many rows contain the value "Book". For the table above, the result should be "3".
I'll be using this formula for a table that spans about 30 columns and thousands of rows.
At first I used:
=COUNTIF(B2:E5,"Book")
but that counts every cell that contains the value "Book" giving me a result of "4", which is not what I'm looking for.
Thanks for any help!
I have a table which contains records in each row.
<table>
<tr><td></td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr>
<tr><td>1</td><td>Name</td><td>Item1</td><td>Item2</td><td>Item3</td><td>Item4</td></tr>
<tr><td>2</td><td>Bob</td><td>Book</td><td>Shirt</td><td>Book</td><td>Pen</td></tr>
<tr><td>3</td><td>Joe</td><td>Pen</td><td>Shoe</td><td>[ ]</td><td>Ring</td></tr>
<tr><td>4</td><td>Ann</td><td>Book</td><td>[ ]</td><td>Shirt</td><td>Pen</td></tr>
<tr><td>5</td><td>Bill</td><td>Shoe</td><td>Shirt</td><td>Ring</td><td>Book</td></tr>
</table>
*Note: Some cells will be empty.
I want to count how many rows contain the value "Book". For the table above, the result should be "3".
I'll be using this formula for a table that spans about 30 columns and thousands of rows.
At first I used:
=COUNTIF(B2:E5,"Book")
but that counts every cell that contains the value "Book" giving me a result of "4", which is not what I'm looking for.
Thanks for any help!
Last edited: