Wednesday, December 26, 2012

yogi_Combine The Results Of Six Queries In Sheet Comparer Into A Single Function in Sheet yogi_Comparer


                                          Google Spreadsheet   Post  #943
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     www.energyefficientbuild.com.    Dec 26, 2012
user Gilles-Japon said:(http://productforums.google.com/forum/?zx=potzyfn0cfbg#!category-topic/docs/spreadsheets/5EzIJBtCPik)
Join queries
Hello,

I need to have the results of several queries to appear in a continuous column if possible. I have now 6 independent queries one under the other one. The reason to keep them one under the other, is that the column data are the same for most (ID number, Last name, First name, Spouse name) or can become so (ID Spouse ---> ID, IDchild1 ---> ID, Spouse First Name ---> First Name, Child1 first name ---> First name etc).
One of the problem is that I cannot know how many lines to keep free between queries to allow for the data to be listed without erasing the queries below. 
Here are the various queries :
First query :
=query('Sur MailChimp'!A:AB;"select G, C, E where not '"&join(";";'Ilot484-11-2012'!A$2:A)&"' contains G ")
Second query :
=query('Sur MailChimp'!A:AB;"select N, L, M where not '"&join(";";'Ilot484-11-2012'!A$2:A)&"' contains N ")
Third query :
=query('Sur MailChimp'!A:AB;"select S, C, R where not '"&join(";";'Ilot484-11-2012'!A$2:A)&"' contains S ")
Fourth query :
=query('Sur MailChimp'!A:AB;"select V, C, U where not '"&join(";";'Ilot484-11-2012'!A$2:A)&"' contains V ")
Fifth query :
=query('Sur MailChimp'!A:AB;"select Y, C, X where not '"&join(";";'Ilot484-11-2012'!A$2:A)&"' contains Y ")
Sixth query :
=query('Sur MailChimp'!A:AB;"select AB, C, AA where not '"&join(";";'Ilot484-11-2012'!A$2:A)&"' contains AB ")
The sample sheet can be found at : https://docs.google.com/spreadsheet/ccc?key=0AkGTeIoz4AcxdDdDZjdjdWtfaU96eHEwaGx0SEFSVkE
Any idea on how to proceed ?
Thank you in advance for all your help.
Gilles
------------------------------------------------------------------------------------------------
following is a solution using VMERGE custom function written by ahab  -- available in script gallery


No comments:

Post a Comment