Identifying cells with same values

droot

New Member
Joined
Oct 18, 2018
Messages
36
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a large spreadsheet with 2 columns A and B

Name1Apple
Name1Apple
Name2Apple
Name2Apple
Name2Peach
Name3Pear
Name3Orange
Name4Pear

<colgroup><col style="width:48pt" width="64" span="2"> </colgroup><tbody>
[TD="width: 64"]Name1[/TD]
[TD="width: 64"]Apple[/TD]

</tbody>

I need a way to identify which person (Name) only likes one type of fruit, so in the above example i would like Name1 to be highlighted in some way.

I've spent the better half of the day trying to figure this out and have tried various methods like Match, count, ifs without any luck.

Can someone help me out please?
 
Re: need help with indentifying cells with same values

It works for me. Though at over 70,000 rows of data, you are going to have major performance issues. Array formulas like this use up a lot of resources when going across that many rows of data (I tested on a much smaller data set, like your example, and it returned the correct results).

I think we will need to come up with different method.
Can you sort your data by Name first, then Fruit?
If so, I think we can do this with a helper column or two.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Re: need help with indentifying cells with same values

Yes that's how it's currently sorted
 
Upvote 0
Re: need help with indentifying cells with same values

OK, let's say that for this example name is in C2:C10, and Fruit is in E2:E10.

Then we can use a helper column to get a running unique count in column F.
Enter this in F2 and copy down to F10:
Code:
=IF(C2=C1,IF(E2=E1,F1,F1+1),1)

Now, to get the total unique count associated properly for every row, enter this formula in G2 and copy down to G10:
Code:
=LOOKUP(2,1/($C$2:$C$10=$C2),$F$2:$F$10)
(this formula gotten from this post here: https://www.mrexcel.com/forum/excel...ax-value-1-criteria-no-array.html#post3051055)

Filter column G to only show rows with value of exactly 1, and you should get what you want.
 
Upvote 0
Re: need help with indentifying cells with same values

That worked! Thank you for help, really appreciate it!
 
Upvote 0
Re: need help with indentifying cells with same values

You are welcome.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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