# Union of two sheets

**URL:** https://community.glideapps.com/t/union-of-two-sheets/18151
**Category:** Ask for Help
**Created:** [November 9, 2020, 9:18am UTC](https://community.glideapps.com/t/union-of-two-sheets/18151 "2020-11-09T09:18:23Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)
#### Post date: [November 9, 2020, 9:18am UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/1 "2020-11-09T09:18:23Z")

</div>

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:  
={TableA!A2:B;TableB!A2:B}

but in TableC only the rows of TableA appear.

Where am I wrong?  
Thanks

---

<div class="post-metadata">

### Author: ![hisashi.fujita](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hisashi.fujita/32/17088_2.png) [@hisashi.fujita](https://community.glideapps.com/u/hisashi.fujita)
#### Post date: [November 9, 2020, 9:56am UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/3 "2020-11-09T09:56:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 9, 2020, 10:08am UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/4 "2020-11-09T10:08:44Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/a/0a62f3e056978d3668407b1d2413f061f74e3231.png)

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

---

<div class="post-metadata">

### Author: ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)
#### Post date: [November 9, 2020, 12:03pm UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/5 "2020-11-09T12:03:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![hisashi.fujita](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hisashi.fujita/32/17088_2.png) [@hisashi.fujita](https://community.glideapps.com/u/hisashi.fujita)
#### Post date: [November 9, 2020, 1:48pm UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/6 "2020-11-09T13:48:53Z")

</div>

Check out the spreadsheet below.

> **[QUERY\_test](https://docs.google.com/spreadsheets/d/1G3KzLgQZplgFhkjLz2-63lQhQnHAHJ47zcFsSYR5BBQ/edit?usp=sharing)**
>
> TableA
> 
> TableA\_A,TableA\_B
> TableA\_A\_01,TableA\_B\_01
> TableA\_A\_02,TableA\_B\_02
> TableA\_A\_03,TableA\_B\_03

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 9, 2020, 2:12pm UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/7 "2020-11-09T14:12:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)
#### Post date: [November 9, 2020, 3:08pm UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/8 "2020-11-09T15:08:33Z")

</div>

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 😑  
Thanks @ThinhDinh and @hisashi.fujita for your support.

---

<div class="post-metadata">

### Author: ![MaxB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maxb/32/15623_2.png) [@MaxB](https://community.glideapps.com/u/MaxB)
#### Post date: [November 16, 2020, 10:48pm UTC](https://community.glideapps.com/t/union-of-two-sheets/18151/9 "2020-11-16T22:48:01Z")

</div>

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

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/f/bf6d74ec759b0a3cbae5ec0f5a2fa80c474894da.jpeg "Combine Multiple Worksheets to One Master Sheet in Google Sheets (Tab Names Included)") ](https://www.youtube.com/watch?v=DDlh3EN6NV8)

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
