Home > Back-end >  How can I merge 2 tables having one common column into one table?
How can I merge 2 tables having one common column into one table?

Time:05-29

I have 2 tables on different sheets.

Table #1 has columns:

  • Fruit
  • Size
  • Color

Table #2 has columns:

  • Fruit
  • Price
  • Currency

I wanna have a table #3, where I would have automatically and always up-to-date columns:

  • Fruit
  • Size
  • Color
  • Price
  • Currency

By always up-to-date I mean that if I update data in table #1 or table #2 - table #3 would automatically sync with them.

To explain better here is a enter image description here

CodePudding user response:

all you need is:

=INDEX(QUERY({'Fruit base data'!A:C, 
      VLOOKUP('Fruit base data'!A:A, 'Fruit extended data'!A:C, {2, 3}, 0)}, 
 "where Col1 is not null", 1))

enter image description here

  • Related