Remove duplicates within a row

Hello, I have a spreadsheet that contains phone numbers that I need to consolidate.

I have attached an example of the data I am working with here: Spreadsheet: phone_number_cleanup_example.ods


As you can see, multiple columns contain the same values, within the same row. I need to consolidate this list and remove all the duplicates WITHIN THE SAME ROW. For example, cells C2 and D2 contain the same phone number. I need to remove one of these.

I do NOT need to remove duplicates within the entire spreadsheet. For example, cells D2 and H7 contain the same phone number, but are not in the same row and therefore are not considered duplicates, for my purposes.

I have searched for macros, extensions, formulas, etc. to no avail. I am a computer programmer but am fairly inexperienced when it comes to spreadsheets. Any help is GREATLY APPRECIATED!


(Edit: activated screenshot -AK)

Please take a look to the attache sample Clean Up Duplicate Phones,
with a second sheet the first three columns are copied directly with one cell array to avoid zeroes.
From fourth column with a MATCH over the last eight characters (to solve some special cases) of the phone number, searching if it is on some cell before on the same row.

What do you mean, “copied directly with one cell array to avoid zeroes”? Can you walk through your process in a more detailed, step-by-step, fashion?

When doing a reference to an empty cell results in a zero, while with the same reference as array results in a empty string.

Which is only a matter of display of the final result though, both variants keep the "this is an empty cell / element" until the final result is resolved, i.e. displayed. Otherwise comparing a reference to an empty cell against an empty array element would not yield TRUE (as 0 is not equal to an empty string). ;-)

Thanks for explain.

@asusdc, Use Conditional Formatting, C2: L2 Duplicate, then copy this area to the other C3:Cn line, and paste format only.

Duplicates per line will be identified, by the chosen color, delete the discarded one.

Note: Identifies only identical values, if not spelled differently.

test file

ATTENTION: If you would like to give more details to your question, use edit in question or add a comment below. Thank you.

If the answer met your need, please click on the ball Descrição da imagem to the left of the answer, to finish the question.