How to modify this formula to make the result get the data with its original color & font formatting.

=query(Sheet1!A1:D,"select A,B,C,D where A is not null",0)

Lets say I want only column D to be in the new tab with its original color format.


1 Answer 1


That cannot be done with query() or any other Google Sheets built-in function, so you will have to write your own custom code in Google Apps Script.

Some of the best resources for learning Google Apps Script include the Beginner's Guide, the New Apps Script Editor guide, the Fundamentals of Apps Script with Google Sheets codelab, the Extending Google Sheets pagejavascript.infoMozilla Developer Network and Apps Script at Stack Overflow.

  • Your answer will be more helpful if you suggest a workaround or alternative.
    – Rubén
    May 7, 2021 at 21:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.