9

I created anew function in sheets from within a sheet. The function is not recognized:

  1. From within the sheet tools > script editor
  2. function DOUBLE(input) {
      return input * 2;
    }
    
  3. save

  4. Go into the sheet, enter a cell and type =double(10)

  5. Error "unknown function 'double'"

Rubén
  • 34,714
  • 9
  • 70
  • 166
Doug Fir
  • 19,971
  • 47
  • 169
  • 299
  • More info. I'm on the new version of sheets if that makes a difference. Also I have two scripts attached to the sheet. – Doug Fir Aug 18 '15 at 18:52
  • Can you share your spreadsheet ? – JPV Aug 18 '15 at 19:37
  • I don't understand why there is a slash in. "unknown function 'double/'". Have you tried retyping your formula in a few other cells? Not copy and paste but retyping. – ScampMichael Aug 19 '15 at 02:20
  • Hi @ScampMichael I opened the sheet again just now. For another reason I had cleared by browsers cookies about an hour ago. The custom functions are now working as expected. Don;t understand why they did not before I have not changed anything else, cookies must have been it. The backslash was a typo on my part – Doug Fir Aug 19 '15 at 03:32
  • 1
    I had this issue and I realized it was because I was editing a sheet with my work identity, but every time I opened the script editor, it opened with my personal identity and so I was saving my script in the wrong place. Unfortunately, trying to switch identities in the script editor led to a "you must request permission...request not sent—would you like to request permission?" loop. Opening the sheet and the script editor in an incognito window solved this. – moraleboost Apr 01 '20 at 15:08

1 Answers1

6

Clearing my cookies seemed to do the trick. Not sure if that qualifies as an answer but if anyone else comes across this post I hope that helps.

Doug Fir
  • 19,971
  • 47
  • 169
  • 299