I have a number of spreadsheets
I want to join them horizontally by Id.
How would you achieve that?
p.s I should mention that the id
order could be different in each spreadsheet
I have a number of spreadsheets
I want to join them horizontally by Id.
How would you achieve that?
p.s I should mention that the id
order could be different in each spreadsheet
Use the vlookup()
function in an { array expression }. Put this formula in cell Sheet1!C1
:
=arrayformula(
{
iferror( vlookup(A1:A, Sheet2!A1:C, column(Sheet2!B1:C), false) ),
iferror( vlookup(A1:A, Sheet3!A1:B, column(Sheet2!B1), false) )
}
)
If you want a new table in the Combine
sheet, put this formula in cell Combine!A1
:
=arrayformula(
{
Sheet1!A1:B,
iferror( vlookup(Sheet1!A1:A, Sheet2!A1:C, column(Sheet2!B1:C), false) ),
iferror( vlookup(Sheet1!A1:A, Sheet3!A1:B, column(Sheet2!B1), false) )
}
)
Combine
sheet, then use query()
or filter()
to create reports in yet another sheet. Please ask only one question per post.
Commented
Oct 9, 2022 at 5:17
column(Sheet2!B1:C)
I used {2,3}
do define columns that I want.
Commented
Oct 9, 2022 at 6:25