Compare text in columns for duplicates

dkjonesau

New Member
Joined
May 9, 2014
Messages
46
Hi all,

Been scratching my head & searching for a solution on this. Can't work it out.
I have a table of data representing competitors at an event. Over time the event attracts new entrants, and loses some. I'm trying to compare year on year to see who has come back year on year based on the year prior, and a separate comparison to see who has competed who was there in the first year the event ran. The table looks like the table below. The numbers highlighted in yellow are the results I want.

Club patronage 2017 - 2022.xlsx
ABCDE
120172018201920202021
2DaveDennisJaneJaneDerek
3JessDaveDaveAaronBill
4BobbyBobbyDennisDarrenJess
5DamienJessBobbyAdamBobby
6LizLizAaronLizLiz
7DarrenAmyXavierXavier
8Adam
9
10
11CompareThose that returned from year before
122017-182018-192019-202020-21
134322
14
15Compare those that returned compared to first year
162017-182017-192017-202017-21
174213
Sheet11
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A8,E2:E9Cell ValueduplicatestextYES


I did a conditional format for duplicates to find these but I can't do that for the number of sheets I need. I'm looking for a way either VBA or sumproduct type comparison formula that compares the columns and finds the duplicate values.

First row is obviously column compared with column to it's left. Second row compares column with the original entrants in A column.
Any help appreciated.

DJ
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
To return numbers of the anual comparison:

Excel Formula:
=SUM(COUNTIF(B2:B8,A2:A8))

For the comparison with year 2017 simply add semi-absolute referencing:

Excel Formula:
=SUM(COUNTIF(B2:B8,$A2:$A8))

Drag both formulas right.
 
Upvote 0
Solution
@JvdV - that is awesome. Thanks. Knew there had to be something simple I was missing. I was way overthinking it.
While you're on it, if I wanted to count the number of unique entries in a column who are new competitors (ie never been prior year) what would be the simplest way to count values in say column C that did not appear in A & B?

DJ
 
Upvote 0
@JvdV - that is awesome. Thanks. Knew there had to be something simple I was missing. I was way overthinking it.
While you're on it, if I wanted to count the number of unique entries in a column who are new competitors (ie never been prior year) what would be the simplest way to count values in say column C that did not appear in A & B?

DJ
I believe you could use:

Excel Formula:
=SUM(--(COUNTIF($A2:A8,B2:B8)=0))

Drag right.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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