Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

row by row comparison using a "countif" and "and" condition?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
controlfreak - 12 May 2008 20:49 GMT
Using Excel 2003.  Thanks in advance for the formula to
COUNTIF(F2:F2121,"ABC"" AND (L2:L2121 = "DEF"))??  How can you compare
row-by-row using an and condition vs. going thru the entire column?  In other
words, does a row have ABD and DEF simulataneously in 2 separate columns vs
the entire column being evaluated.  I have about 2K columns for which each
row must be evaluated 1 by 1 with this and condition.

Thanks very much!
T Lavedas - 12 May 2008 21:16 GMT
On May 12, 3:49 pm, controlfreak
<controlfr...@discussions.microsoft.com> wrote:
> Using Excel 2003.  Thanks in advance for the formula to
> COUNTIF(F2:F2121,"ABC"" AND (L2:L2121 = "DEF"))??  How can you compare
[quoted text clipped - 4 lines]
>
> Thanks very much!

Since the count can only be zero or one, this will do the same as the
COUNT if ...

=(F2="ABC")*(L2="DEF")

or ...

=IF(AND(F2="ABC",L2="DEF"),1,0)

Just copy it down the column where you want the results.

BTW, the syntax in the COUNTIF you gave is incorrect.  In fact, I
don't see how it can possibly be made to work, even the way you say it
works.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
controlfreak - 16 May 2008 14:10 GMT
Thank you Tom for answering my question on a row by row comparison; I will
see what I can do w/it.  I was unable

to open the email w/out going into “Office Online” specifically, and hence
my delayed thank you note.

I hope you won’t mind if I contact you again w/a question every now and then..

Thanks once again; I really appreciate your time and help!



> On May 12, 3:49 pm, controlfreak
> <controlfr...@discussions.microsoft.com> wrote:
[quoted text clipped - 25 lines]
> ===========
> http://members.cox.net/tglbatch/wsh/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.