Home > Mobile >  merge multiple worksheets into a new sheet with condition
merge multiple worksheets into a new sheet with condition

Time:10-15

I have two sheets I want to merge into a new sheet such that: the new sheet is the same Sheet 2 with multiple columns from Sheet 1.

Sheet 1:

Col 1 Col 2 Col 3 Colm 4 Colm 5 Colm 6
a 1 1 20 x xx
a 1 2 1 z r
a 1 3 22 h g
a 2 4 5 t d
b 1 1 7 y g
b 2 2 6 j d
b 2 3 4 u aa
b 2 4 7 i s
c 1 1 3 l d
c 2 2 2 k o
c 2 3 8 n u
c 3 4 9 v t
c 3 5 5 x e
c 4 6 8 w q
c 4 7 9 a f
c 4 8 9 c g

Sheet 2:

Col 1 Col 2 Col 3
a 1 3
a 2 4
b 1 1
b 2 4
c 1 1
c 2 3
c 3 5
c 4 8

And here is the expected result: Same data as in Sheet 2, but added the columns Colm 4...Colm 6 from Sheet 1 that match with Col 1...Col 3:

Col 1 Col 2 Col 3 Colm 4 Colm 5 Colm 6
a 1 3 22 h g
a 2 4 5 t d
b 1 1 7 y g
b 2 4 7 i s
c 1 1 3 l d
c 2 3 8 n u
c 3 5 5 x e
c 4 8 9 c g

Here the screenshot wit the sample input and output: sample excel file

and in L2, just the following one:

=H2:J9
  • Related