Re: removing early duplicates

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 03/06/04


Date: Sat, 6 Mar 2004 17:23:27 -0500

Assume you data is in A1 going down column A.

in B1 put in a formula

=if(Countif($A$1:A1,A1)=1,"Keep","Delete")

then drag fill this down the column.

select A1 and then do Data=>Filter=>Autofilter

In the dropdown in B1, select Delete.

Then highlight all the rows below Row A and do Edit=>Delete.

Now do Data=>Filter=>Autofilter to turn off the autofilter.

Only the unique list should remain.

If this isn't what you want, post back with what you mean by UDF. Generally
a UDF refers to a vba custom function that is used in a worksheet as a
formula - but formulas can't change existing cells - they can't delete data
inplace.

-- 
Regards,
Tom Ogilvy
"Mike" <junkmoskowitz@cinci.rr.com> wrote in message
news:823501c403c3$2b6f5880$a301280a@phx.gbl...
> Can anyone help me with a UDF to remove early duplicates
> from a list?
>
> Example:
> Input:
>  A
>  B
>  A
>  C
>  B
>
> Output:
>  A
>  C
>  B
>
> Thanks,
> Mike


Relevant Pages

  • Re: Four User Defined Functions - probably one similar answer
    ... If all you need is a line or two to describe the UDF try this. ... Ballon Tips are not available with Laurent's method. ... Gord Dibben MS Excel MVP ... "Mike H" wrote: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Formula Search (is it possible?)
    ... If you're asking about using the Edit/Find menu function, choosing ... Formulas in the Find dialog's Look In dropdown will look at formulas and ... If you're asking about a worksheet function, here's one way using a UDF: ...
    (microsoft.public.excel)
  • Re: Functions in VBA
    ... If you press Shift-F3 and choose "User Defined" from the dropdown ... you should see your UDF with its arguments. ... you are in Excel and press Shift-F3 again. ...
    (microsoft.public.office.developer.vba)
  • Re: GDI+
    ... Thanks again Mike, but it does not access the API in a visible way... ... > class is only a wrapper class to access the GDI Flat APIs. ... >> This UDF returns the fullpath of the temporary bitmap created by the ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Last valid value in array
    ... and drag the formula down.. ... Juan Pablo González ... > I have written a UDF to search through a range to find the last valid ... > Basically I transfer the range to an array and search from the end back ...
    (microsoft.public.excel.programming)