From: B Lynn B on 7 Jun 2010 18:15
The headers would not prevent it working unless you had a blank row between
the headers and the data, or no header in column A. Before posting, I tested
this (Excel 2007 Pro) on a block of data with duplicates in column X and it
worked just fine. And it accounts for all the conditions that appeared to
need satisfying. From your sample data, it seems the duplicates may not be
listed consecutively, and you specified the first instance should be the one
left, so re-sorting the data is likely to create problems.
If you've copied this section into a procedure that does other things as
well, perhaps you could post the whole thing to see if there is some other
factor causing it to fail. You don't happen to have any protection on the
sheet do you?
> I tried your macro, but it doesn't seem to be working... Maybe the fact that
> there are headers is screwing it up? I've been working with your code since
> you posted it, but I can't get it to work correctly (Column A has data in
> every cell until the bottom of my data set).
From: Don Guillett on 7 Jun 2010 18:23
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.
Microsoft MVP Excel
"Jbm" <Jbm(a)discussions.microsoft.com> wrote in message
> Well this is deleting things, but not necessarily duplicates, and
> cells instead of rows (which means correlated data is getting thrown off).
> Not all the data is in one cell, sorting would be allowed as long as the
> of data each stay together.