What You Will Learn
You will learn how to ask Gemini to create IF, IFS, and SWITCH formulas that apply business rules, such as segmenting accounts, flagging risks, or assigning priority levels.
Required Dataset
No external dataset is required.
Create two tabs:
Conditional_Logic_Practice
Logic_Check
Before You Start
In Conditional_Logic_Practice, create sample columns for:
Account Name
Industry
Annual Revenue
Risk Level
Account Segment
Priority Level
Review Needed
Add 10–15 sample rows. Use revenue values such as 25000, 75000, 150000, and 500000. Use risk values such as Low, Medium, and High.
Step-by-Step Instructions
Step 1. Ask Gemini for an IF formula
Open Gemini and enter:
Act as a Google Sheets formula coach.
Create an IF formula that classifies an account as Enterprise if Annual Revenue is 100000 or more, otherwise Commercial.
Annual Revenue is in column C.
Account Segment should go in column E.
Return the formula, explanation, and validation step.
Expected formula:
=IF(C2>=100000,”Enterprise”,”Commercial”)
Step 2. Ask Gemini for an IFS formula
Now ask:
Create an IFS formula for Account Segment.
Rules:
– Strategic if Annual Revenue is 500000 or more
– Enterprise if Annual Revenue is 100000 or more
– Commercial if Annual Revenue is below 100000
Expected formula:
=IFS(C2>=500000,”Strategic”,C2>=100000,”Enterprise”,C2<100000,”Commercial”)
Rule order matters. Put the largest threshold first.
Step 3. Ask Gemini for a SWITCH formula
Ask:
Create a SWITCH formula that converts Risk Level into Priority Level.
Rules:
– High risk = P1
– Medium risk = P2
– Low risk = P3
– Anything else = Review
Expected formula:
=SWITCH(D2,”High”,”P1″,”Medium”,”P2″,”Low”,”P3″,”Review”)
Step 4. Add a review flag
Use:
=IF(OR(E2=”Strategic”,F2=”P1″),”Yes”,”No”)
This flags strategic or high-risk accounts for review.
Expected Result
You should have a practice sheet that uses conditional logic to assign account segment, priority level, and review status.
Check Your Work
Confirm that high-revenue accounts are classified correctly, high-risk accounts receive P1, unknown risk values return Review, and the review flag catches the right rows.
Optional Extension
Ask Gemini:
Review my conditional logic formulas. Identify rule-order issues, missing fallback values, unclear thresholds, and rows that should be manually reviewed.
