Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Countif in non adjacent columns

Is it possible to use countif to count the number of times a certain number
appears in column A, C, E...etc through to W, but ignoring columns B, D, F,
etc through to X

I can only get the countif to work if I use the full range (A1:X1)




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Countif in non adjacent columns

Just add them up:

=COUNTIF(A:A,13)+COUNTIF(C:C,13)


If you have many columns, it is better to use SUMPRODUCT()
--
Gary''s Student - gsnu200806


"mickjjuk" wrote:

Is it possible to use countif to count the number of times a certain number
appears in column A, C, E...etc through to W, but ignoring columns B, D, F,
etc through to X

I can only get the countif to work if I use the full range (A1:X1)




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Countif in non adjacent columns

Try the following formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER...

=SUM(IF(MOD(COLUMN(A1:X1)-COLUMN(A1),2)=0,IF(A1:X1=A5,1)))

....where A5 contains the number of interest.

Hope this helps!

In article ,
mickjjuk wrote:

Is it possible to use countif to count the number of times a certain number
appears in column A, C, E...etc through to W, but ignoring columns B, D, F,
etc through to X

I can only get the countif to work if I use the full range (A1:X1)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Countif in non adjacent columns

Thanks for the help, it works fine. This seems like the 'tidier' option of
the 2 suggestions.

"Domenic" wrote:

Try the following formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER...

=SUM(IF(MOD(COLUMN(A1:X1)-COLUMN(A1),2)=0,IF(A1:X1=A5,1)))

....where A5 contains the number of interest.

Hope this helps!

In article ,
mickjjuk wrote:

Is it possible to use countif to count the number of times a certain number
appears in column A, C, E...etc through to W, but ignoring columns B, D, F,
etc through to X

I can only get the countif to work if I use the full range (A1:X1)


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
Add adjacent cell value to existing CountIF formula scottia Excel Worksheet Functions 9 September 14th 08 02:43 AM
Using CountIf with non-adjacent cells in same column RS Excel Discussion (Misc queries) 3 June 28th 07 05:45 PM
Countif across multiple non-adjacent cells Shu of AZ Excel Discussion (Misc queries) 2 October 25th 06 05:27 PM
countif = < AND value in adjacent columns match criteria crafty_girl Excel Worksheet Functions 3 April 27th 06 08:40 PM
How do I use countif across non-adjacent cells? Nick Excel Worksheet Functions 2 June 9th 05 03:28 AM


All times are GMT +1. The time now is 07:24 AM.

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

About Us

"It's about Microsoft Excel"