Need Formula For Repeating Values

serge

Well-known Member
Joined
Oct 8, 2008
Messages
1,446
Office Version
  1. 2007
Platform
  1. Windows
Hi all,

I need 2 formulas Please, to count how many numbers have been repeated from a range of data.

A1:E1 : 1 , 3 , 14 , 30 , 52
A2:E2 : 12 , 24 , 28 , 30 , 36
A3:E3 : 2 , 4 , 23 , 27 , 36
A4:E4 : 24 , 30 , 42 , 53 , 54

A5:E5 : 3, 30 , 24 , 25 , 53

1st : If I take A5:E5 How many numbers have been repeated from : A4:E4 ?

2nd : If I take A5:E5 How many numbers have been repeated from : A1:E4 ? and does not count duplicate, number 30 has showed 3 times but it would count for 1.

Thank you.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
1st formula should return : 3

2nd formula should return : 4
 
Upvote 0
Can someone give me a hand please, those formulas are important for my work.

Thanks a lot. Serge.
 
Upvote 0
I did those formulas but would it be a more elegant way to get the same result ? and sorry the 2nd formula result should be : 7.

1st :

=COUNTIF(A4:E4,A5)+COUNTIF(A4:E4,B5)+COUNTIF(A4:E4,C5)+COUNTIF(A4:E4,D5)+COUNTIF(A4:E4,E5)


2nd :

=COUNTIF(A1:E4,A5)+COUNTIF(A1:E4,B5)+COUNTIF(A1:E4,C5)+COUNTIF(A1:E4,D5)+COUNTIF(A1:E4,E5)

Thank you... Serge.
 
Upvote 0
I did those formulas but would it be a more elegant way to get the same result ? and sorry the 2nd formula result should be : 7.

1st :

=COUNTIF(A4:E4,A5)+COUNTIF(A4:E4,B5)+COUNTIF(A4:E4,C5)+COUNTIF(A4:E4,D5)+COUNTIF(A4:E4,E5)


2nd :

=COUNTIF(A1:E4,A5)+COUNTIF(A1:E4,B5)+COUNTIF(A1:E4,C5)+COUNTIF(A1:E4,D5)+COUNTIF(A1:E4,E5)

Thank you... Serge.

1]

=SUMPRODUCT(COUNTIF(A5:E5,A4:E4))

2]

Either:

=SUMPRODUCT(COUNTIF(A1:E4,A5:E5))

Or:

=SUMPRODUCT(COUNTIF(A5:E5,A1:E4))
 
Upvote 0
Thank you very much!! Aladin, much better like this.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top