Tuesday, November 15, 2011

yogi_Query A Range And Suppress Display Of Specified Columns

Yogi Anand, D.Eng, P.E.                                         Google Spreadsheet                            www.energyefficientbuild.com
user Artiom Neganov said:
How to remove column from array?
I have a query returning 2-dimensional array like:
=query('Sheet1'!A1:J;"select * where Col3='value'"))
How can I remove a 3rd column from the output?
How can I remove a 3rd an 5th column from the output?
Sorry for asking probably stupid questions here - I just can't find good function reference on Google Spreadsheets.
As my esteemed colleague and fellow Top Contributor A.P.L. (aka Adam) at Google Docs Help Forum said
Not stupid questions at all. :-)
and I am sure Andre (aka ahab) my esteemed colleague and Google Docs Guru at Google Docs Help Forum, where he is mentor to most Google spreadsheet enthusiasts, and the soul of the Google spreadsheet Help Forum (about whom we are really concerned because we have not heard from him now for about a couple of months) would agree that there is no such thing as a stupid question!

Following is one generalized solution to the problem ...
Sheet1 shows data to be QUERYed , Sheet2 shows the result after executing the QUERY function