In Google Sheets, camelCase refers to a text formatting style where multiple words are joined together without spaces, and each new word starts with a capital letter. The capitalization creates visual "humps" in the text, mimicking a camel's back. [1, 2, 3]
There are two variations of camelCase used in spreadsheet environments: [1, 2]
  • lowerCamelCase: The very first letter is lowercase (e.g., totalPrice, monthlySales, customerAddress).
  • UpperCamelCase (PascalCase): The first letter is capitalized (e.g., TotalPrice, MonthlySales, CustomerAddress). [1, 2, 3]
Common Uses in Google Sheets
  • Named Ranges: When assigning a unique name to a cell or block of cells, spaces are not allowed. Using camelCase (like taxRate2026) is a highly readable alternative to using underscores. [1, 2, 3]
  • Apps Script Coding: If you write JavaScript macros inside Google Apps Script to automate tasks, camelCase is the required coding standard for variables and functions (e.g., spreadsheet.getActiveSheet()). [1]
  • Data Cleaning: Importers often turn raw spreadsheet data strings into camelCase formats for web-friendly processing and organization. [1]
How to Convert Text to camelCase Using Formulas
Google Sheets does not have a native =CAMELCASE() function, but you can build one using standard text formulas: [1, 2, 3, 4]
1. Convert text to UpperCamelCase (PascalCase) [1, 2, 3]
To turn text like "monthly sales data" in cell A1 into MonthlySalesData, use: [1]
excel
=SUBSTITUTE(PROPER(TRIM(A1)), " ", "")
Use code with caution.
  • How it works: PROPER capitalizes every single word. SUBSTITUTE removes all the blank spaces. [1, 2, 3]
2. Convert text to lowerCamelCase
To turn text like "monthly sales data" in cell A1 into monthlySalesData, use: [1]
excel
=REPLACE(SUBSTITUTE(PROPER(TRIM(A1)), " ", ""), 1, 1, LEFT(LOWER(TRIM(A1))))
Use code with caution.
  • How it works: It builds the UpperCamelCase text first, then replaces the very first letter with its lowercase version. [1]