Newsgroups: microsoft.public.excel.misc
From: "Tom Ogilvy" <twogi...@msn.com>
Date: Fri, 20 Dec 2002 16:18:18 -0500
Local: Fri, Dec 20 2002 4:18 pm
Subject: Re: Duplcate Rows for 5 Sheets
untested, but I believe this will do what you want. Change Col = 5 to refer
to the column where you want the comparison. Public Sub DeleteDuplicateRows() Dim Col As Integer Col = 5 ' column E - set to your column On Error GoTo EndMacro shArray = Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5") For k = UBound(shArray) To LBound(shArray) Set Rng = ActiveSheet.UsedRange.Rows( _ N = 0 Next k Application.ScreenUpdating = True End Sub Regards, > I copied a Macro from Chip Pearson's site that deletes duplicate rows if
there > is a duplicate entry in a specified column(shown below)...is there anyway to > get this Macro to work on 5 worksheets by simply comparing the same column in > each of the 5 worksheets? > Thanks! > Public Sub DeleteDuplicateRows() > Dim Col As Integer > On Error GoTo EndMacro > Col = ActiveCell.Column > If Selection.Rows.Count > 1 Then > N = 0 > EndMacro: > Application.ScreenUpdating = True > End Sub You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||