Forum Discussion

JosephA1915's avatar
JosephA1915
Copper Contributor
Jul 04, 2021
Solved

Merge Data From Two Sheets in Same Workbook and Sort

macOS Catalina/Excel for Mac 16.50

 

Hello.  What is the best way to merge data from two (or more) sheets in the same workbook onto a "Summary" sheet and then sort by the data in the first column (in this case, the date)?  I would like for this to update on the Summary sheet automatically as values are added/removed/edited on any of the source sheets.

 

The data on each sheet is organized something like this...

 

 

 

Thank you, 

 

Joseph

 

 

 

 

  • JosephA1915 

    I don't know how exactly your data is structured, for that better to have sample file. Assume you have two structured tables, they could be in different sheets. If ranges, you may convert them to tables by Ctrl+T or use named ranges. Something like this

    To join these tables you may use formula as

    =LET(
      rowsOne, ROWS(Table1),
      rowsTwo, ROWS(Table2),
      c,       SEQUENCE(,COLUMNS(Table1)),
      hMerge, LET(
       k, SEQUENCE(rowsOne+rowsTwo),
       IF(k<=rowsOne,
          INDEX(Table1, k, c),
          INDEX(Table2, k-rowsOne, c))
     ),
     SORT(hMerge)
    )

    and instead of Table1, Table2 use names of your actual tables or ranges.

15 Replies

Resources