Whoa! You are making this a lot more complicated than it need be. Well, I should temper that by saying it is pretty easy IF you are more than passingly familiar with Excel. Here is how I'd do it.

1) Start with an Excel spreadsheet that is formatted like the sample you posted.

2) Go to the end of column C, and type in "1", then in the next row "2". Note that since the previous cells were zero-filled, the new ones you typed automatically zero-filled to three places.

3) Highlight the two cells you just typed, then put your cursor on the bottom right corner of the cell with the "002". The cursor will become a plus sign. Left-click and drag downwards and column "C" will fill with incremental numbers, from 003 to however far down you want to drag.

4) Now highlight the whole spreadsheet and click Data --> Sort. Choose "ID" for your sort key.

5) Highlight column "C" by clicking on the "C" column identifier at the top of the column.

6) Click Data --> Filter --> Advanced Filter; select "Filter the List in-place" and "Unique records only." Click "OK".

It looks complicated with 6 steps, but each step is pretty self-explanatory and takes just a moment to execute, and the process has the advantage of being self-contained all within Excel. After replicating your four-row sample, I ended up with the attached in less than a minute. Is that what you were after?

One important caveat: These instructions work with an old version of Excel (Excel 2002, if you can believe it) and newer versions (after, I think about Excel 2007) will have their menu structure completely different from what I have described.

Another curious thing... after you do the Filter in place step, the series fill thing (where you dragged the plus-sign cursor down and it filled in the cells incrementally) will no longer work. A bug in Excel?

tanstaafl.


Attachments
Bruno.xls (89 downloads)

_________________________
"There Ain't No Such Thing As A Free Lunch"