ysskrishna logoysskrishna

Chapter 3 of 7 · 3 min

Change case and naming styles

Sentence case, Capitalized Case, UPPER, lower and iNVERT, plus nine programmer styles from kebab-case to SCREAMING_SNAKE_CASE.

The Case tab has two groups. COMMON covers everyday capitalisation; ADVANCED covers the naming styles programmers use for column names, keys, slugs and constants.

Common styles

OptionWhat it does"the QUICK brown fox"
Sentence caseCapitalises the start of sentencesThe quick brown fox
Capitalized CaseFirst letter of each word uppercaseThe Quick Brown Fox
lower caseEverything lowercasethe quick brown fox
UPPER CASEEverything uppercaseTHE QUICK BROWN FOX
iNVERT cASESwaps upper and lower per characterTHE quick BROWN FOX

Use Capitalized Case for people's names and titles, Sentence case for descriptions, UPPER CASE for codes such as country or currency codes.

Names need care. Capitalized Case turns mcdonald into Mcdonald and o'neil into a result you should check. Review a sample after converting names.

Advanced naming styles

The sidebar lists nine:

Option"Customer Order ID" becomesTypical use
kebab-casecustomer-order-idURL slugs, CSS classes
hyphen-caseword-style hyphenationReadable hyphenated labels
dot.casecustomer.order.idConfig keys
camelCasecustomerOrderIdJavaScript and JSON keys
PascalCaseCustomerOrderIdClass and type names
snake_casecustomer_order_idDatabase columns, Python
SCREAMING_SNAKE_CASECUSTOMER_ORDER_IDConstants, env variables
SCREAMING-KEBAB-CASECUSTOMER-ORDER-IDSome HTTP headers and labels
AlTeRnAtInG cAsEcUsToMeR oRdEr Id (pattern varies)Fun, not data

The listing describes hyphen-case as "word-style hyphenation", distinct from kebab-case.

Where naming styles save real time

  1. Preparing a header row for a database import. Select the header row, choose snake_case, click Apply. Ship Date → ship_date, ready for a CREATE TABLE.
  2. Generating JSON keys. Convert headers to camelCase before exporting with Table Converter (see the Table Converter course).
  3. Building slugs. A title column converted to kebab-case gives URL slugs. Strip punctuation first with the Clean tab.
  4. Environment variable lists. SCREAMING_SNAKE_CASE for a column of setting names.

Step by step: header row to snake_case

  1. Type sample headers in row 1: Customer Name, Order ID, Ship-Date, Total amount.
  2. Select row 1's cells only.
  3. Open Case, scroll to ADVANCED, choose snake_case, click Apply.
  4. Expected: customer_name, order_id, ship_date, total_amount.
  5. If an input had punctuation such as Total ($), clean it first: Clean → Strip specific characters ()$.

Order of operations

Run Clean before Case. Stray spaces and punctuation become stray underscores or hyphens in naming styles: " Order ID " might become _order_id_. Trim first and you avoid the problem.

Practice: the same text in six styles

Put customer first name in A1:A6 (six copies, so you can compare side by side). Select one cell at a time and apply a different style from the Case tab:

StyleResult
Capitalized CaseCustomer First Name
UPPER CASECUSTOMER FIRST NAME
snake_casecustomer_first_name
camelCasecustomerFirstName
kebab-casecustomer-first-name
SCREAMING_SNAKE_CASECUSTOMER_FIRST_NAME

Then try a messy input: Customer-First name (extra spaces, a hyphen, mixed case). Apply snake_case and check whether you get customer_first_name or something with doubled underscores. Whatever the result, running Trim both from the Clean tab first removes the edge spaces, which is why chapter 2 comes before this one.

Names that should not be title-cased

Capitalized Case changes every word, which is wrong for some real data: McDonald becomes Mcdonald, iPhone becomes Iphone, van der Berg becomes Van Der Berg, and acronyms like IIT become Iit. Sheets' own =PROPER() has the same limitation. For people's names and product names, apply the case change, then sort the column and scan for these patterns, or leave such columns as they are.

Quick check

  1. Which style for Postgres column names?snake_case.

  2. Your slugs come out with odd characters. What did you skip?Cleaning punctuation (Clean tab) before converting to kebab-case.

  3. Which common style fits a list of book titles?Capitalized Case (then review exceptions).

Continue exploring

ProductGoogle WorkspaceGoogle Sheets Text Power Tools

Google Sheets Text Power Tools

Fix messy sheet text in place. Case, trim, strip, and extract without leaving the grid.
Google Sheets Text Power Tools
Text & Data Conversion
Google Workspace Add-ons
Google Sheets
ProductGoogle WorkspaceGoogle Sheets Tab Manager

Google Sheets Tab Manager

Your workbook outgrew the tab bar. Clean it up in batches.
Google Sheets Tab Manager
Google Workspace Add-ons
Google Sheets
Google Apps Script
CourseCover image for Table Converter for Google Sheets: Import and Export Markdown, JSON, HTML and CSV

Table Converter for Google Sheets: Import and Export Markdown, JSON, HTML and CSV

Import Markdown, JSON, HTML and CSV tables into Google Sheets without broken columns, and export any range as clean Markdown, JSON, HTML or CSV.

Google Sheets Table Converter
Google Sheets
+1

6 chapters · 16 min

BlogCover image for How to Delete Multiple Tabs in Google Sheets at Once (Bulk Hide, Rename, Sort)

How to Delete Multiple Tabs in Google Sheets at Once (Bulk Hide, Rename, Sort)

Google Sheets Tab Manager
Google Workspace Add-ons
+1
2 min read
ProductGoogle WorkspaceGoogle Sheets Merge Tools

Google Sheets Merge Tools

Repeatable merges in Google Sheets, without the misclick marathon.
Google Sheets Merge Tools
Google Workspace Add-ons
Google Sheets
Google Apps Script
CourseCover image for Sheets Tab Manager: Delete, Hide, Rename, Colour and Sort Tabs in Bulk

Sheets Tab Manager: Delete, Hide, Rename, Colour and Sort Tabs in Bulk

Delete multiple tabs in Google Sheets at once, hide and unhide in bulk, rename with find and replace, colour and sort tabs A–Z with the free Sheets Tab Manager.

Google Sheets Tab Manager
Google Sheets
+1

6 chapters · 24 min