Duplicate rows, put in another value

C

Carol G.

I'm not proficient in macros, so I was looking for a function that will look
for duplicates and mark one of them so I can delete it but then put in the
combined mail name.

My data looks like this:
ConsID CombinedName AddrName Final Mailing Name
01234 Mr. and Mrs. Joe Smith Mr. Joe Smith Mr. Joe Smith
01243 Mr. and Mrs. Joe Smith Mrs. Joe Smith delete
01235 Mrs. Henry Doe Mrs. Henry Doe

When I combine Mr. Joe Smith and Mrs. Joe Smith, I want the Final Mailing
Name to read Mr. and Mrs. Joe Smith because it will be going to both of them.

The final result would be:
ConsID CombinedName AddrName Final Mailing Name
01234 Mr. and Mrs. Joe Smith Mr. Joe Smith Mr. and Mrs. Joe Smith
01243 Mr. and Mrs. Joe Smith Mrs. Joe Smith delete
01235 Mrs. Henry Doe Mrs. Henry Doe

I've been using
=if (A2=B2, "Delete","")
but I can't figure out how to pull the combined name into another column?

Thanks- I hope this makes sense.
 
M

Max

Can I presume you had a typo under col A, ie that it should be:

ConsID
01234
01234
01235

If so, col A could be used definitively to identify the duplicates

You could then place this in D2 (under "Final Mailing Name"):
=IF(A2="","",IF(COUNTIF(A$2:A2,A2)>1,"delete",IF(B2="",C2,B2)))
and copy D2 down as far as required, to return desired results
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top