tess
tess

Reputation: 23

Google Spreadsheet get unique values from two different sheets

Thanks in advance for your help!

I have two tabs, Events1 and Events2, each of which contain dates in column A. In another tab, Summary, I have successfully pulled the following info:

[1] A sorted list of the unique dates from Events1 column A; this was extracted using this formula =join("; ",unique(query(Events1!$A$2:$A$125,"select A where A is not null order by A")))
[2] A sorted list of the unique dates from Events2 column A; this was extracted using this formula =join("; ",unique(query(Events2!$A$2:$A$125,"select A where A is not null order by A")))

Now, what I am trying to figure out how to do is, in tab Summary, pull:
[3] A sorted list of the unique dates from both Events1 column A and Events2 column A.

Example  Events1 column A  Events2 column A
               June 12, 2014        June 14, 2014
               June 11, 2014        June 14, 2014
               June 12, 2014        June 13, 2014
               June 13, 2014
               June 13, 2014

Then [1] returns "6/11/2014; 6/12/2014; 6/13/2014" and [2] returns "6/13/2014; 6/14/2014". And I would like [3] to return "6/11/2014; 6/12/2014; 6/13/2014; 6/14/2014".

I hope I explained that properly. Thanks!

Tess

Upvotes: 0

Views: 6283

Answers (1)

tess
tess

Reputation: 23

FYI I solved this using a hidden sheet.

Within the hidden sheet I created a column where I put in the top data cell:
=transpose(sort(split(join("; ",Summary!B12,Summary!B13),"; "),1,TRUE))

And then within the Summary sheet I pulled the info I wanted with this:
=join("; ",unique(query('Hidden sheet'!$A$2:$A$250,"select A where A is not null order by A")))

Upvotes: 2

Related Questions