How to transfer comments when transferring data from one table to another in Google Sheet with the QUERY+IMPORTRANGE function

Viewed 127

comments transferred How are comments written in cells transferred when data is moved From one Google Sheet table to another while using a function QUERY+IMPORTRANGE enter image description here

1 Answers

At the moment it's not possible to show notes or comments by using IMPORTRANGE

You can fill out a Feature Idea to add that functionality into Google Sheets on https://www.googlecloudcommunity.com/gc/Feature-Ideas/gh-p/workspace-ideas-group

As a workaround, if you copy and paste the cells, comments and notes will be copied over, but you can do it programmatically in Google Apps Script by using copyTo

// The code below copies the first 5 columns over to the 6th column.
var sheet = SpreadsheetApp.getActiveSheet();
var rangeToCopy = sheet.getRange(1, 1, sheet.getMaxRows(), 5);
rangeToCopy.copyTo(sheet.getRange(1, 6));
Related