Home > Software engineering >  Formula or VBA to find and remove row-wise duplicates but keep column-wise duplicates
Formula or VBA to find and remove row-wise duplicates but keep column-wise duplicates

Time:08-09

I have an excel sheet with duplicate entries in rows and columns (See sample below).

I need to eliminate values that appear more than once in each row so that each row is left with only unique values, while keeping the column-wise duplicate values. I have scoured the internet for days but there doesn't seem to be a solution to this anywhere. All I can find are the basic duplicate data elimination techniques which wouldn't work in my case. Any solution will be very much appreciated!

Sample of what I'm trying to get at

CodePudding user response:

You can use UNIQUE() function with TRANSPOSE().

=TRANSPOSE(UNIQUE(TRANSPOSE(A1:E1)))

enter image description here

  • Related