Worksheet problem


Posted by Stacey Kohr on November 26, 2001 11:16 AM

I need to add a function to a macro that will take any "repeated" words out of a list of unknown length.
A spreadsheet lists transactions with the account name in column A. I would like to just show the first occurence of this name so that the list would look like this:
cars 10 | instead of: cars 10
20 | cars 20
15 | cars 15
buses 1 | buses 1
5 | buses 5

I do not know beforehand how many transactions there are in total (so I think I need to use an array but am not sure).

I was thinking of something that says if this cell is the same as the previous cell replace with " " else move on to next in list.

As you can tell my skills are somewhat basic - please make it simple.

Posted by Jubo on November 26, 2001 11:26 AM

In other words you want to remove the duplicate ?

Posted by Stacey Kohr on November 26, 2001 11:29 AM

Yep that's it. Just the word in Column A not the data in the other columns.


Posted by Aladin Akyurek on November 26, 2001 1:11 PM

Stacey --

I'll assume that your data occupy columns A and B.
Insert an empty row before the beginning of your data (if there isn't one with or without labels) and a column next column A.

In B2 enter: =IF(ISNUMBER(MATCH(A2,$A$1:A1,0)),"",A2)

Activate cell B2 and give a double click on the Fill Handle (little black square).

Aladin

==========



Posted by Stacey Kohr on November 27, 2001 6:03 AM

Aladin,

Thanks so much for your help - that works beautifully!!!