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  

Countifs



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2009, 05:24 PM posted to microsoft.public.excel.worksheet.functions
CD27
external usenet poster
 
Posts: 12
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  
Old April 21st, 2009, 05:41 PM posted to microsoft.public.excel.worksheet.functions
Domenic[_2_]
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  
Old April 21st, 2009, 06:36 PM posted to microsoft.public.excel.worksheet.functions
CD27
external usenet poster
 
Posts: 12
Default Countifs

Thanks Domenic, works perfectly.
 




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:21 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.