ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   two condition formula (https://www.excelbanter.com/excel-worksheet-functions/263280-two-condition-formula.html)

LINDA

two condition formula
 
I am trying to count column "a" when a condition is true and then count
column "j" when the number is a negative.

I have tried =COUNTIF(B9:B23,"=COMP")+COUNTIF(J7:J22,""<0)
but I do not get the answer it should be. Column "b is words and column "J
is number that are negative so that why I choose <0.

Column B will have multiple names and column J is the difference in late days.



Jacob Skaria

two condition formula
 
Hi Linda

Try the below

=SUMPRODUCT((B9:B23="COMP")*(J9:J23<0))

If you are using XL2007 try help on COUNTIFS()

--
Jacob (MVP - Excel)


"linda" wrote:

I am trying to count column "a" when a condition is true and then count
column "j" when the number is a negative.

I have tried =COUNTIF(B9:B23,"=COMP")+COUNTIF(J7:J22,""<0)
but I do not get the answer it should be. Column "b is words and column "J
is number that are negative so that why I choose <0.

Column B will have multiple names and column J is the difference in late days.




All times are GMT +1. The time now is 03:28 AM.

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