Is there even a limit to the number of named ranges that you can create within a single Google Spreadsheet?

It's rather cumbersome to add a new one, so I would prefer to not just open a spreadsheet and start making them over and over until it tells me there's a limit after 100 or 255 or something.

1 Answer 1


I was able to make 4963 named ranges, before the execution time of the Google Apps Script expired, using this piece of code.


function namedRanges() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  for(var i=1; i<5000; i++) {
    var r = ss.getRange('A'+i);
    ss.setNamedRange("test"+i, r);


enter image description here

If you plan on making larger named ranges (I created only one celled ranges), I guess it will take longer and thus reduce the amounts you can make.

If you're about to add them manually, I'd say you're safe.

  • 1
    Oh, well I imagine that nearly 5000ish is plenty even if you're naming almost every special value in your spreadsheet.
    – Lokathor
    Commented Feb 9, 2014 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.