ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   record count using two different cells (https://www.excelbanter.com/excel-worksheet-functions/5460-record-count-using-two-different-cells.html)

Josborne

record count using two different cells
 
Hello,
I am trying to get a record count based on two fields
say col A = X and col B=Y then count the record.
I have used =COUNTIF(H23:H999,A1) + COUNTIF(B23:B999,A8),
but it looks to be giving me the result of the first plus the result of the
second. Can anyone help.

Frank Kabel

Hi
=SUMPRODUCT(--(H23:H999=A1),--(B23:B999=A8))

--
Regards
Frank Kabel
Frankfurt, Germany


Josborne wrote:
Hello,
I am trying to get a record count based on two fields
say col A = X and col B=Y then count the record.
I have used =COUNTIF(H23:H999,A1) + COUNTIF(B23:B999,A8),
but it looks to be giving me the result of the first plus the result
of the second. Can anyone help.



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

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