Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get cell note value

Is there a way to get cell note value and display the all the note in the cell next to it?

I have a column C where some of the cells contain note. I would like to get these note value and write each cell note in the cell next to it in column D.

For example: if cell C4 has a note "No entry", I want to display "No entry" in D4.

Thanks.

Alex

like image 339
Alex Avatar asked Jul 12 '13 07:07

Alex


1 Answers

I needed to do this today and found your question but no answer. This is what I finally came up with. You can do this by setting up a function in the script editor named getNote.

function getNote(cell)
{
   var ss = SpreadsheetApp.getActiveSpreadsheet();
   var range = ss.getRange(cell)
   return range.getNote();
}

then in your spreadsheet enter:

=getNote("C4")

to get the note from cell C4. If you want it to be a reference that changes when you move around the cells, then reference it this way:

=getNote(Address(row(C4), column(C4)))

Word of caution: Notes don't trigger a refresh, so if a note is edited the cell does not pick up the new value right away

like image 157
JOMan Avatar answered Nov 21 '22 15:11

JOMan