Home » excel » Align duplicates on the same rows in Excel

Align duplicates on the same rows in Excel

Posted by: admin May 14, 2020 Leave a comment

Questions:

two columns like these in Excel with rows duplicates and I need to make white rows on both of the columns for the cells that aren’t matched:

Col1    Col2  
A       C  
B       I  
C       E  
D       D  
E       J

And I need to:

A     BLANK

B     BLANK

C     C

BLANK I

D     BLANK

E     E

BLANK J

I can only expand the second row to align the first one but the unique values of the second row disappear:
=IF(ISNA(MATCH(A1;B:B;0));””;INDEX(B:B;MATCH(A1;B:B;0)))
Please help me

How to&Answers:

Here’s what I would do:

  1. Create a column to the left of both of these (say column A) with all of the values from both columns combined. (You can do this by copying and pasting them and then removing duplicates.)
  2. Then write the following functions in columns B and C, respectively (assuming that the data you have is in columns E and F):

    =IFERROR(VLOOKUP(A1, E:E, 1, FALSE),””)

    =IFERROR(VLOOKUP(A1, F:F, 1, FALSE),””)