4

How do I add a custom font size for a Google Spreadsheet dropdown menu default values?

There are some defaults like 14pt, 18pt, 24pt and 36pt, but I would like to have a font size like 30pt, is it possible?

2 Answers 2

2

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

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

You can change the font-size in a Google Spreadsheet from 6 pt all the way up to 400 pt, just by typing in the size you want. When you click on the "Font size" icon drop-down you will notice the current size in the "input box" is highlighted in blue, you can type in that box the size you want and press Enter. A lot of programs has this feature but a lot of people just thought the sizes given were the default but they are not. The only thing in Google Sheets to remember is you can't go lower than 6pt or higher than 400pt. Watch video below...

https://drive.google.com/file/d/0B9SDHUV4OUOIZVliVXR3dlVKclk/view?usp=sharing

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.