Union of two sheets

I need to merge rows from two identical sheets (TableA, TableB) into a third sheet (TableC).

I am using this function in cell A1 of TableC:

but in TableC only the rows of TableA appear.

Where am I wrong?

Try the following QUERY function.
=QUERY({TableA!A2:B;TableB!A2:B},"where Col1 is not null")

1 Like

Not sure what’s the exact problem with your data but it should work.

If you can share screenshots in private message then I’ll try to have a look.

1 Like

I also tried this but it doesn’t work anyway …

Check out the spreadsheet below.

Or I think a filter also works, with the same logic as what Hisashi presented.

I’m sorry I wasted your time.
The function was correct and rows were merged. The problem is that I did not consider empty rows :expressionless:
Thanks @ThinhDinh and @hisashi.fujita for your support.


Hello everyone, I hope I’m not too ot, I united different sheets into another one, but then I have to change some values of those original elements but I don’t know how to relate the item click to the original data source, if possible at all.

In this video

he uses this formula, where the “text” part creates a column with the specified text, different for every sheet reference,
=FILTER({Pietanze!$A$2:$J; “Pietanze”}; Pietanze!A2:A <> “”);
which would help me but it doesn’t work because the problem is that it makes one row where it expects 999, I don’t know how to solve this