Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How can I 'CountIf' alternate cells?

We're using large excel 2007 workbooks and I'd like to apply the CountIf
function to alternate cells in a row. The rows are D22:KC22 and contain
numeric entries (from 1 to 5).

I want to count the number of "1" entries in each alternate cell.

What's the best way of achieving this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default How can I 'CountIf' alternate cells?

Try

=SUMPRODUCT(--(MOD(COLUMN(D22:KC22),2)=0),--(D22:KC22=1))

for alternate columns with even numbers (D, F, H, etc.) For alternate
columns with odd numbers (E, G, I, etc.) use

=SUMPRODUCT(--(MOD(COLUMN(D22:KC22),2)=1),--(D22:KC22=1))

Hope this helps,

Hutch

"John Blackwell" wrote:

We're using large excel 2007 workbooks and I'd like to apply the CountIf
function to alternate cells in a row. The rows are D22:KC22 and contain
numeric entries (from 1 to 5).

I want to count the number of "1" entries in each alternate cell.

What's the best way of achieving this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How can I 'CountIf' alternate cells?

Spectacular Tom, a great result. I can't profess to actually understand the
formula but it works a treat.

Thank you,

John

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--(MOD(COLUMN(D22:KC22),2)=0),--(D22:KC22=1))

for alternate columns with even numbers (D, F, H, etc.) For alternate
columns with odd numbers (E, G, I, etc.) use

=SUMPRODUCT(--(MOD(COLUMN(D22:KC22),2)=1),--(D22:KC22=1))

Hope this helps,

Hutch

"John Blackwell" wrote:

We're using large excel 2007 workbooks and I'd like to apply the CountIf
function to alternate cells in a row. The rows are D22:KC22 and contain
numeric entries (from 1 to 5).

I want to count the number of "1" entries in each alternate cell.

What's the best way of achieving this?

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
Sum of Alternate Cells Kamal Singh Oberh[_2_] Excel Discussion (Misc queries) 4 June 1st 08 07:46 PM
Add alternate cells in column and sum Jackanorry Excel Worksheet Functions 4 March 23rd 08 06:28 PM
Help w/ alternate to Countif [email protected] Excel Worksheet Functions 3 December 3rd 07 06:43 PM
Selecting alternate cells Jackie D Excel Worksheet Functions 7 May 20th 06 07:49 PM
analysing data from alternate columns using the countif function Juniper Excel Discussion (Misc queries) 3 April 28th 05 04:12 PM


All times are GMT +1. The time now is 11:26 PM.

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"