Nov 22 2021 07:35 AM
Nov 22 2021 07:35 AM
Hi There. I have an excel table with 3 fields: Email, Date, TOTAL.
There are many repeating email addresses, for example firstname.lastname@example.org may have multiple purchases. I would like to remove the first record for each duplicate email and retain every other record. So for example, if email@example.com made 4 purchases, I want to remove the first instance record and then retain the last 3 instances. I want to remove the record where Total is €100 and keep the next 3 records so that I can do a calculation to sum totals for remaining records, in this example add 50+80+200. In summary, I want to retain all records, except the first record where there is a duplicate. Many Thanks
Nov 22 2021 07:51 AM
Add a column to the right and name it Remove.
Enter the following formula in D2:
Excel should automatically propagate it to the rows below.
Filter the Remove column for TRUE.
Select the rows except for the header row, and delete them.
You can now delete the Remove column; this will automatically remove the filter.
Nov 22 2021 08:11 AM
@Hans Vogelaar, Thank you so much. I am very grateful for you prompt response. This is so simple and effective. Hans, They have now changed their criteria, would you mind looking at question below?
In the example attached for firstname.lastname@example.org, there are 4 records, with 2 different Transaction No's.
email@example.com has 2 separate transactions, first transaction no is 12345 with 2 purchases ~(€100 & €50). I want to remove all records for the first transaction no. and retain all subsequent records for that email address. There can be multiple records per Transaction No.. For firstname.lastname@example.org, there are 3 transactions. I want to remove the first record (i.e. for transaction 23232) and retain subsequent records.
Nov 22 2021 08:28 AM
You can use the same idea, but with a different formula in the Remove column.
If you have Microsoft 365 or Office 2021:
If you have an older version, use the following array formula, confirmed with Ctrl+Shift+Enter:
Again, filter for TRUE, remove the remaining rows, then delete the extra column.
Nov 22 2021 09:39 AMSolution
@Hans Vogelaar THANK YOU - You are a star