Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count occurances question 1

Status
Not open for further replies.

ls62

Programmer
Oct 15, 2001
179
US
Hi,

I have a sheet with columns in pairs. Columns A&B , C&D, E&F ..etc go together. In column G I want to count how many first cells of the pair have a value>0 (A,C,E). In column H I want to count how many 2nd cells have a value (B,D,F).

I tried countif, but couldn't get the range to work I'm sure I'm missing something simple.

Thanks.
LEE
 
=COUNTIF(A1:A100,">0")+COUNTIF(B1:B100,">0")+COUNTIF(C1:C100,">0")

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
opps:

=COUNTIF(A1:A100,">0")+COUNTIF(C1:C100,">0")+COUNTIF(E1:E100,">0")

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Blue,

Thanks, the totals I want have to be by row so I did what you suggested.

=countif(a1,">0")+countif(c1,">0")+countif(e1,">0")+....

There are 14 pairs and I was hoping there would be a shorter formula. I only have to key it in once and then copy the formula down, but I thought there would be a easier way.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top