Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sarah
 
Posts: n/a
Default macro to eliminate repeating account numbers

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!
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

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 (DataAutofilter). Click the dropdown,
select TRUE, and then delete the visible rows. Remove Autofilter, and it is
done.

--

HTH

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


"Sarah" wrote in message
...
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!



  #3   Report Post  
Sarah
 
Posts: n/a
Default

That worked perfectly! Thanks so much!

"Sarah" wrote:

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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with macro to save repeating data entry Tom Excel Discussion (Misc queries) 0 February 16th 05 04:24 AM
How to insert a repeating dash in phone numbers without dashes in. LemonLiptonTea New Users to Excel 3 February 5th 05 05:18 PM
Change Row Numbers in Formula with Macro Frank Excel Discussion (Misc queries) 3 January 4th 05 06:42 PM
macro to eliminate spaces between words CSAM Excel Discussion (Misc queries) 3 December 17th 04 11:39 AM
How do I delete 100 account numbers from a spreadsheet colume wer. Ndubuisi Azuogu Excel Worksheet Functions 2 November 11th 04 04:11 PM


All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"