Counting unique values per row.

Johndeer

New Member
Joined
Jul 26, 2011
Messages
4
Hi, hopefully I can explain my situation, and what I need well enough.... Here goes...

So, I have somewhere around 50 or 60 unique numbers on sheet 1, and about 500 entries containing some of these numbers on sheet 2. The problem is that on sheet 2 some rows countain duplicate values that I need counted from sheet 1. I can not remove these duplicate values, because it is important that the data is not deleted.

So what I need is to be able to search sheet 2 for a unique value, and determine how many rows each of these values appears in. Not a total of how many times this value has appeared, but in how many rows it appears.

I know this has to be possible to do, but how?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi,

Welcome to the forum

A question: in which columns are the numbers in Sheet2? A, B and C, for example?

and also: which rows?

M.
 
Upvote 0
Hi,

Say that Sheet1 A1 houses a number of interest (an unique number).

Maybe this in B1 to get the rows-count
=SUMPRODUCT(--(COUNTIF(OFFSET($D$2:$O$478,ROW($D$2:$O$478)-ROW($D$2),0,1,12),A1)>0))

If your unique numbers in Sheet 1 are in column A, beginning in A1, you can copy down this formula

HTH

M.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,357
Members
452,907
Latest member
Roland Deschain

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