What You Will Learn
You will learn how to ask Gemini to generate text formulas that combine fields, extract email domains, standardize labels, and create readable IDs for cleaner analysis.
Required Dataset
No external dataset is required.
Create two tabs:
Text_Formula_Practice
Text_Check
Before You Start
In Text_Formula_Practice, create sample columns for:
First Name
Last Name
Company
Country
Product Category
Order Date
Add 10–15 sample rows. Include a few inconsistent values, such as lowercase names, extra spaces, mixed country labels, and company names with punctuation.
Step-by-Step Instructions
Step 1. Ask Gemini for text formulas
Open Gemini and enter:
Act as a Google Sheets formula coach.
Create text formulas for Text_Formula_Practice.
I need formulas to:
- Combine First Name and Last Name into Full Name
- Extract Email Domain from Email
- Standardize Country labels
- Create a readable Customer ID
- Create a Product-Country label
- Clean extra spaces and capitalization
Return formulas, explanations, and validation checks.
Step 2. Add common text formulas
For full name:
=PROPER(TRIM(A2)&” “&TRIM(B2))
For email domain:
=IFERROR(LOWER(REGEXEXTRACT(D2,”@(.+)$”)),””)
For cleaned company name:
=PROPER(TRIM(C2))
For product-country label:
=PROPER(TRIM(F2))&” – “&UPPER(TRIM(E2))
For a readable customer ID:
=UPPER(LEFT(TRIM(C2),3)&”-“&LEFT(TRIM(A2),1)&LEFT(TRIM(B2),1)&”-“&TEXT(G2,”yyyymmdd”))
Copy the formulas down.
Step 3. Add a review flag
Create a Review Needed column and use:
=IF(OR(A2=””,B2=””,C2=””,D2=””,E2=””),”Yes”,”No”)
This flags rows missing important text fields.
Expected Result
You should have cleaner text fields, readable labels, extracted email domains, and structured IDs that are easier to filter, group, and analyze.
Check Your Work
Confirm that names are readable, domains do not include @, labels are consistent, IDs are unique enough for the exercise, and missing fields are flagged.
Optional Extension
Ask Gemini:
Review my text formulas and identify risks such as duplicate IDs, malformed emails, inconsistent country labels, extra spaces, or formulas that may fail on missing values.
