Link to home
Start Free TrialLog in
Avatar of Terrygordon
Terrygordon

asked on

Compare words in one column with those in another and flag up duplicates.

Hi all
I have a spreadsheet with columns of words. The number of words in each column varies. I want to write a macro that allows me to:

1. Select a column of words
2. Compare each word in the selected column to every other word in every other column
3. If the current word is the same as another word, place the column headings that contains the match (taken from the first cell in each column) in separate cell to the right of the current word.

If it helps, the column being tested is always column J and the comparisons are always in columns A to I.
So, for example, if the word in cell J15 also appeared in columns A, D and E and the column headings were X, Y and Z, the three cells to the right of J15 would display X, Y and Z respectively.

Hope this makes sense.

Regards

Terry
ASKER CERTIFIED SOLUTION
Avatar of dirknibleck
dirknibleck

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BTognietti
BTognietti

Terry,

Here is an Excel Add-In, developed by one of our Experts, that manipulates duplicates in the manner you require;

http://members.iinet.net.au/~brettdj/

Good luck,

Bud
Avatar of Terrygordon

ASKER

Thanks DIrk

I used a variation of your countif solution and it works a treat. A Homer Simpson "D'oh" moment once you realise how easy it is. I think sometimes we get so bogged down with VB solutions that we forget that Excel is actually a pretty versatile tool in its own right. :-)

Bud

Useful interface, but didn't really do what I was after, so I have awarded the points to DIrk.

Regards

Terry