#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default Conditional COUNTIF

What is wrong with this formula

IF(COUNTIF($AQ2:$BB2,OR("ABC","DEF")),"T","F")
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Conditional COUNTIF


Sara;344766 Wrote:
What is wrong with this formula

IF(COUNTIF($AQ2:$BB2,OR("ABC","DEF")),"T","F")You can't use the OR operator like that you need to use an array like

this:
=IF(COUNTIF($AQ2:$BB2,{"ABC","DEF"}),"T","F")


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=96462

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Conditional COUNTIF


Simon Lloyd;344786 Wrote:
You can't use the OR operator like that you need to use an array like
this:
=IF(COUNTIF($AQ2:$BB2,{"ABC","DEF"}),"T","F")Ignor e that rubbish i just sent you - don't know why i did that, its

early hours of the morning here, use this:
=IF(OR(COUNTIF($AQ2:$BB2,"ABC"),COUNTIF($AQ2:$BB2, "DEF")),"T","F")


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=96462

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Conditional COUNTIF

Try it like this:

=IF(SUM(COUNTIF($AQ2:$BB2,{"ABC","DEF"})),"T","F")

--
Biff
Microsoft Excel MVP


"Sara" wrote in message
...
What is wrong with this formula

IF(COUNTIF($AQ2:$BB2,OR("ABC","DEF")),"T","F")



  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Conditional COUNTIF

Here's one alternative which serves your underlying intents:
=IF(SUMPRODUCT(--ISNUMBER(MATCH($AQ2:$BB2,{"ABC","DEF"},0))),"T","F ")
Success? Pl click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:370 Subscribers:68
xdemechanik
---
"Sara" wrote:
What is wrong with this formula
IF(COUNTIF($AQ2:$BB2,OR("ABC","DEF")),"T","F")

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
Conditional Countif nancy Excel Discussion (Misc queries) 2 July 27th 07 06:24 PM
conditional COUNTIF Richard Excel Discussion (Misc queries) 7 May 3rd 07 12:06 AM
Conditional Countif force530 Excel Worksheet Functions 7 July 1st 05 10:08 PM
Conditional countif force530 Excel Worksheet Functions 6 July 1st 05 06:09 PM
countif conditional Ken Excel Worksheet Functions 1 June 15th 05 06:05 PM


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