I'm trying to get the following function to work by calling it from a spreadsheet cell:
=IsFormula(A1)
function IsFormula(aCell) {
return cell.getFormula().length != 0
}
What should I do?
Dror
Press F5 or CTRL+G to launch the Go To dialog. In the Go to list, click the name of the cell or range that you want to select, or type the cell reference in the Reference box, then press OK. For example, in the Reference box, type B3 to select that cell, or type B1:B3 to select a range of cells.
A custom function must start with a Function statement and end with an End Function statement. In addition to the function name, the Function statement usually specifies one or more arguments. You can, however, create a function with no arguments.
Custom functions only have access to the cell's value, not the Range object itself. In your case, aCell would contain the value of the cell, which wouldn't work for your use case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With