I want to create an app script on Google Sheets that creates a custom formula to show what font size text a cell contains.
I found Google has a function "getFontSize", but no luck in getting it to work:
function FONTSIZE(range) {
return getFontSize(Number)
}
I believe your goal is as follows.
In this case, how about the following modification?
function FONTSIZE(range) {
return SpreadsheetApp.getActiveSheet().getRange(range).getFontSizes();
}
=FONTSIZE("A1")
and =FONTSIZE("A1:C3")
in a cell. By this, the font size of the cell "A1" is returned.getFontSize()
and/or getFontSizes()
.