ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   simple countif formula (https://www.excelbanter.com/excel-worksheet-functions/255421-simple-countif-formula.html)

Brian

simple countif formula
 
Column B in my spreadsheet consists of 10 rows with one letter in each cell.

I would like a formula to count cells B1,B3,B5,B7 and B9 only if the value
in each of those cells is "H". I have tried a simple formula like this
=countif(B1,B3,B5,B7,B9,"H") but it does not work.

Thanks for your help with this formula.

--
Brian

Bob Phillips[_4_]

simple countif formula
 
Try

=SUMPRODUCT(--(MOD(ROW(B1:B9),2)=1),--(B1:B9="H"))

HTH

Bob

"Brian" wrote in message
...
Column B in my spreadsheet consists of 10 rows with one letter in each
cell.

I would like a formula to count cells B1,B3,B5,B7 and B9 only if the value
in each of those cells is "H". I have tried a simple formula like this
=countif(B1,B3,B5,B7,B9,"H") but it does not work.

Thanks for your help with this formula.

--
Brian




Lars-Åke Aspelin[_2_]

simple countif formula
 
On Thu, 4 Feb 2010 14:09:01 -0800, Brian
wrote:

Column B in my spreadsheet consists of 10 rows with one letter in each cell.

I would like a formula to count cells B1,B3,B5,B7 and B9 only if the value
in each of those cells is "H". I have tried a simple formula like this
=countif(B1,B3,B5,B7,B9,"H") but it does not work.

Thanks for your help with this formula.


Try this formula:

=(B1="H")+(B3="H")+(B5="H")+(B7="H")+(B9="H")

Hope this helps / Lars-Åke


All times are GMT +1. The time now is 07:04 PM.

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