LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default On Duplicate, update record

I would insert a new column E.

I'd put this in E2 (headers in row 1, right?)

=text(a2,"mm-dd-yyyy")&"."&b2&text(c2,"mm-dd-yyyy")
and drag down as far as I needed.

Then in F2 (another helper column):
=IF(COUNTIF($E$2:E2,E2)=COUNTIF(E:E,E2),"keepme"," delete me")
and drag down.

Then filter column F to show the deleteme's (after you do some minor checking).

And then delete the visible rows.

Then remove the filter and delete the two helper columns.

=======
If I needed a macro, I would do the same thing, but in code. In fact, I'd
record a macro when I did it manually to help build the code.



MikeD1224 wrote:

I have a table of data that has 4 columns:

Column A : Transaction Date
Column B: Prescription #
Column C: Date of Service
Column D: Amount Due

Using Column A, B & C I can identify unique records.

The file is organized chronologically by Transaction Date (column A).

I am trying to find a method by which I can write a macro or script to go
through the file and upon finding a duplicate record, remove all but the last
instance/occurrence.

Any help/ideas would be much appreciated.

Mike


--

Dave Peterson
 
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
How do I remove duplicate in a column but keep the record of the f sragor New Users to Excel 2 February 3rd 09 04:42 PM
Finding Duplicate Record in more than one column peterwhite Excel Discussion (Misc queries) 2 September 29th 08 12:56 PM
while entering text excel should not accept duplicate record..? HAYAT Excel Worksheet Functions 1 December 5th 07 07:37 AM
Need to color 1 record of each set of Duplicate Records nirod Excel Worksheet Functions 3 May 21st 07 02:36 PM
delete duplicate record but only determine 1 column data AskExcel Excel Worksheet Functions 3 January 28th 06 01:11 PM


All times are GMT +1. The time now is 12:41 PM.

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

About Us

"It's about Microsoft Excel"