Tim
asked on
Merge a duplicate row based on the data of one column.
Dear Excel/VB Experts,
I am trying to right a macro in Excel that will help cleanup the duplicates in my workbook. I have some rows with a duplicate field and would like to have the first occurrence of the duplicate deleted and replaced with the second along with all the fields after it.
For example:
(before)
name phone email address
someone 11111111 hbdfk@
hbdfk@ 12 jjj ave
Someonelse 33333333 dsds@
dsds@ 23 jjj blvd
(after)
name phone email address
someone 111111111 hbdfk@ 12 jjj ave
someoneelse 333333333 dsds@ 23 jjj blvd
Is this possible??
Thanks in advance.
I am trying to right a macro in Excel that will help cleanup the duplicates in my workbook. I have some rows with a duplicate field and would like to have the first occurrence of the duplicate deleted and replaced with the second along with all the fields after it.
For example:
(before)
name phone email address
someone 11111111 hbdfk@
hbdfk@ 12 jjj ave
Someonelse 33333333 dsds@
dsds@ 23 jjj blvd
(after)
name phone email address
someone 111111111 hbdfk@ 12 jjj ave
someoneelse 333333333 dsds@ 23 jjj blvd
Is this possible??
Thanks in advance.
ASKER
ASKER
Here is the desired outcome of that sample sheet.
Sample-of-Desired-Outcome.xlsx
Sample-of-Desired-Outcome.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks that worked fine!
ASKER
Hi, could you help me understand why the For n = 1 To 110 is there?
n = 1 thru 110 denotes the number of columns that you have with data. if the number of columns are more, then 110 will increase accordingly.
ASKER
Oh I see. Thank you sir. What about the 65536? if you don't mind.
couple of questions -
1. are the duplicate entries listed in consecutive rows in the file?
2. What is the key (field) used to identify duplicate records?
Can you please post a sample sheet?
thanks,
Ardhendu