#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Countifs

I am having problems with a formula. I have a worksheet with 9
columns (A thur I) that contain various numbers. I need to create a
formula that if any cell in row 1 contains either a {1,2,3,4,6,20}
input 1 and if not input 0.

I tried the following but it only seems to be counting the cells with
a 1. =COUNTIF(A14:I14,{1,2,3,4,6,20})

Countifs seems to be doing the same thing in Excel 2007.


Thanks

CD
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Countifs

In article
,
CD27 wrote:

I am having problems with a formula. I have a worksheet with 9
columns (A thur I) that contain various numbers. I need to create a
formula that if any cell in row 1 contains either a {1,2,3,4,6,20}
input 1 and if not input 0.

I tried the following but it only seems to be counting the cells with
a 1. =COUNTIF(A14:I14,{1,2,3,4,6,20})

Countifs seems to be doing the same thing in Excel 2007.


Thanks

CD


Try...

=(SUM(COUNTIF(A14:I14,{1,2,3,4,6,20}))0)+0

or

=(SUMPRODUCT(--ISNUMBER(MATCH(A14:I14,{1,2,3,4,6,20},0)))0)+0

--
Domenic
http://www.xl-central.com
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Countifs

Thanks Domenic, works perfectly.
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
Countifs to Sumproduct for 2003 - was Simple Countifs.. from Fr Steve Excel Worksheet Functions 2 January 4th 09 05:36 PM
COUNTIFS Skinman Excel Worksheet Functions 3 December 11th 08 05:29 AM
Countifs Diane Excel Worksheet Functions 1 November 21st 08 09:43 AM
Two COUNTIFs Russell Excel Discussion (Misc queries) 2 August 19th 08 02:18 AM
Countifs Fx in 07 how in 03? HenderH Excel Discussion (Misc queries) 19 March 26th 08 12:37 PM


All times are GMT +1. The time now is 01:25 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"