A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

simple countif formula



 
 
Thread Tools Display Modes
  #1  
Old February 4th, 2010, 10:09 PM posted to microsoft.public.excel.worksheet.functions
Brian
external usenet poster
 
Posts: 1,396
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  
Old February 4th, 2010, 10:18 PM posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_]
external usenet poster
 
Posts: 489
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  
Old February 4th, 2010, 10:21 PM posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_]
external usenet poster
 
Posts: 722
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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:44 AM.


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