ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   row by row comparison using a "countif" and "and" condition? (https://www.excelbanter.com/excel-programming/410814-row-row-comparison-using-countif-condition.html)

Controlfreak

row by row comparison using a "countif" and "and" condition?
 
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

row by row comparison using a "countif" and "and" condition?
 
On May 12, 3:49 pm, controlfreak
wrote:
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!


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

row by row comparison using a "countif" and "and" condition?
 
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 wont mind if I contact you again w/a question every now and then..

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





"T Lavedas" wrote:

On May 12, 3:49 pm, controlfreak
wrote:
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!


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/



All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com