LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 1 May 2003 12:26:24 -0400
Reply-To:     Howard_Schreier@ITA.DOC.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard_Schreier@ITA.DOC.GOV
Subject:      Re: Excel macro needed for deleting the old rows.

Nice, but both Q and A belong in an Excel newsgroup, not SAS-L.

On Thu, 1 May 2003 15:53:00 +0530, Vivek Gupta <vgupta@IIMAHD.ERNET.IN> wrote:

>Hi, > >The code below removes duplicate on the basis of A1 column in the worksheet. > >Vivek >****************************************************************** >Sub RemDup() >' >' RemDup Macro >' Macro recorded 6/22/2001 by Vivek Gupta >' > >' > Dim sName As String > > sName = InputBox("Enter the worksheet name:") > > Worksheets(sName).Range("A1").Sort _ > key1:=Worksheets(sName).Range("A1") > Set currentcell = Worksheets(sName).Range("A1") > Do While Not IsEmpty(currentcell) > Set nextcell = currentcell.Offset(1, 0) > If nextcell.Value = currentcell.Value Then > currentcell.EntireRow.Delete > End If > Set currentcell = nextcell > Loop > >End Sub >****************************************************************** >----- Original Message ----- >From: "Boopathi" <sriboopathi@YAHOO.COM> >Newsgroups: bit.listserv.sas-l >To: <SAS-L@LISTSERV.UGA.EDU> >Sent: Thursday, 1 May 2003 3:06 PM >Subject: Excel macro needed for deleting the old rows. > > >> In my excel data sheet the frist two columns are unique. >> >> As the list is very huge i will added the latest modifications in the >> end of the excel sheet. The excel macro should be capable of >> identifing the duplicate ones and it should delete the old entry from >> the excel sheet. >> >> I feel the work is more without a help of an excel macro..pl help me >> >> Please let me know whether it is possible or not and suggest on the >> same. if somebody have some sample code it will be really helpful for >> me.


Back to: Top of message | Previous page | Main SAS-L page