ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to count two cells occurrences in a worksheet (https://www.excelbanter.com/excel-worksheet-functions/209559-how-count-two-cells-occurrences-worksheet.html)

ben mustapha

How to count two cells occurrences in a worksheet
 
Dear Expert,
I have a excel worksheet of 5 column and 100 rows with random cells values, I would like to count the occurrence of two cells in the worksheet. For example, if A1=1, A2=3 and C5=1 and C6=3 then the occurrence number is 2, and so on...

Thanks

Bernard Liengme

How to count two cells occurrences in a worksheet
 
Do you wish to count how many times two adjacent cells hold the same
numbers? Is this any pairs of numbers or 1 and 3 specifically? Does (1, 3)
match (3, 1) or is the order important?
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

<ben mustapha wrote in message ...
Dear Expert,
I have a excel worksheet of 5 column and 100 rows with random cells
values, I would like to count the occurrence of two cells in the
worksheet. For example, if A1=1, A2=3 and C5=1 and C6=3 then the
occurrence number is 2, and so on...

Thanks




Sheeloo[_3_]

How to count two cells occurrences in a worksheet
 
Need more information...

Do you want to count the occurences of each number in the worksheet?
=Countif(A1:E100,1) will give you the count of times 1 occurs in first five
columns and 100 rows...

"ben mustapha" wrote:

Dear Expert,
I have a excel worksheet of 5 column and 100 rows with random cells values, I would like to count the occurrence of two cells in the worksheet. For example, if A1=1, A2=3 and C5=1 and C6=3 then the occurrence number is 2, and so on...

Thanks


ShaneDevenshire

How to count two cells occurrences in a worksheet
 
Hi,

Here's what you want:

=SUMPRODUCT(--(COUNTIF(A1:E100,A1:E100)=2))

--
Thanks,
Shane Devenshire


"ben mustapha" wrote:

Dear Expert,
I have a excel worksheet of 5 column and 100 rows with random cells values, I would like to count the occurrence of two cells in the worksheet. For example, if A1=1, A2=3 and C5=1 and C6=3 then the occurrence number is 2, and so on...

Thanks



All times are GMT +1. The time now is 12:06 PM.

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