Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2005

Tip: Looking for answers? Try searching our database.

macro to eliminate repeating account numbers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sarah - 16 Mar 2005 22:31 GMT
Hello -

I have report that shows customer account numbers and the date transactions
occurred for that account.  Some customers have more than one row on my
spreadsheet because they have made more than one transaction.

I only want to show the FIRST transaction each customer made and delete each
subsequent one for each customer.

Macros are fairly new to me, but what I want to do is sort the spreadsheet
by account number, then transaction date (I know how to make the macro do
that part) and then program the macro to delete any duplicate transaction
rows per customer, leaving just that original transaction.

I would really appreciate any help in accomplishing this.  Thanks!
Bob Phillips - 16 Mar 2005 23:44 GMT
Use Autofilter

Assuming your data in column A, add this formula to B1

=COUNTIF($A$1:A1,A1)>1

and copy down.

Then apply a filter to column B (Data>Autofilter). Click the dropdown,
select TRUE, and then delete the visible rows. Remove Autofilter, and it is
done.

Signature

HTH

RP
(remove nothere from the email address if mailing direct)

> Hello -
>
[quoted text clipped - 11 lines]
>
> I would really appreciate any help in accomplishing this.  Thanks!
Sarah - 17 Mar 2005 00:11 GMT
That worked perfectly!  Thanks so much!

> Hello -
>
[quoted text clipped - 11 lines]
>
> I would really appreciate any help in accomplishing this.  Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.