ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I do this? (https://www.excelbanter.com/excel-programming/377888-how-can-i-do.html)

Rachel

How can I do this?
 
Hello. Here's the scenario:

I have a list of numbers in Colum A, and a list in Colunm B.
A B
1 2
1 1
2 1
3 1
4 2
1 2
3 1

I want to count the number of cells in Column B with a certain value (say
'2'), but only if the adjacent cell in column A contains a certain value (say
'1'). Can anyone help?

Thanks a million,
Rachel.


Bob Phillips

How can I do this?
 
=SUMPRODUCT(--(A1:A7=1),--(B1:B7=2))

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Rachel" wrote in message
...
Hello. Here's the scenario:

I have a list of numbers in Colum A, and a list in Colunm B.
A B
1 2
1 1
2 1
3 1
4 2
1 2
3 1

I want to count the number of cells in Column B with a certain value (say
'2'), but only if the adjacent cell in column A contains a certain value

(say
'1'). Can anyone help?

Thanks a million,
Rachel.





All times are GMT +1. The time now is 10:00 PM.

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