Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 683
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple COUNTIF problem Matthew Excel Worksheet Functions 5 April 9th 08 02:45 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
COUNTIF TO BUILD SIMPLE CODE Eddy Stan Excel Worksheet Functions 6 August 26th 07 11:06 PM
"Simple" countif formula? not for me... Ray Excel Discussion (Misc queries) 3 July 9th 07 08:08 PM
simple countif Brian Excel Worksheet Functions 1 February 3rd 05 01:25 AM


All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"