Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

How do I add a custom font size for a Google Spreadsheet I have? There are some defaults like 14pt, 18pt, 24pt and 36pt, but I would like to have a font size like 30pt, is it possible?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

There's no way to do that in Google Spreadsheets, only the font sizes you already mentioned. There is however the possibility to do that via Google Apps Script. The following piece of code will create a menu option (upon opening):

function onOpen() {
  // get active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();

  // create menu
  var menu = [{name: "Set font size", functionName: "fontSize"}];

  // add to menu
  ss.addMenu("Font", menu);  
}

function fontSize() {
  // set active spreadsheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();

  // set active sheet
  var sh = ss.getActiveSheet();

  // create input box
  var fontSize = Browser.inputBox("Set Font Size:");

  // get active cell and apply font size  
  var cell = sh.getActiveCell().setFontSize(parseInt(fontSize));  
}

You can create your own script but adding this one to your own sheet:
enter image description here

In the example file I created, you can play with it: fontSize

share|improve this answer
    
Is it possible to have a script that allows a custom input box for the font size? –  Jeremy Jan 6 '13 at 13:55
    
That's not what your question was about. I will look into it. –  Jacob Jan Tuinstra Jan 6 '13 at 13:57
    
@Jeremy Did it, now it's the users choice. –  Jacob Jan Tuinstra Jan 6 '13 at 14:05
    
Great, thank you very much! It works like a charm :) –  Jeremy Jan 6 '13 at 14:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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