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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Conditional COUNTIF



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2009, 04:10 AM posted to microsoft.public.excel.misc
Sara
external usenet poster
 
Posts: 261
Default Conditional COUNTIF

What is wrong with this formula

IF(COUNTIF($AQ2:$BB2,OR("ABC","DEF")),"T","F")
  #2  
Old May 14th, 2009, 04:34 AM posted to microsoft.public.excel.misc
Simon Lloyd[_250_]
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  
Old May 14th, 2009, 04:37 AM posted to microsoft.public.excel.misc
Simon Lloyd[_251_]
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  
Old May 14th, 2009, 04:41 AM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
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  
Old May 14th, 2009, 04:44 AM posted to microsoft.public.excel.misc
Max
external usenet poster
 
Posts: 8,574
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")

 




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 06:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.