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.