Sub topic 2
Building tables and templates
This chapter assumes you know cells, ranges such as B2:B, and the functions SUM and IF. You need Gemini in Sheets on your account. Availability depends on your plan and admin settings.
Building tables and templates
Open the Gemini side panel from the toolbar. Name the table's purpose and list each column header. For example: "Create a table to track monthly expenses with columns Date, Category, Description, Amount, and Paid By." Gemini proposes a layout. Check the headers, then confirm that dates and amounts are stored as dates and numbers, not as text.
Asking for formulas
Name the target column, the source column, the calculation, and the rule for blank rows. For example: "In column F, add a formula that shows the Amount from column D plus 10% tax, and leave the cell blank when column D is empty." A reply like this is a good starting point:
=IF(D2="", "", D2*1.1)Reading what a formula does before you apply it
Ask Gemini to explain the formula in plain words. Then check three things:
- Which range does it read?
- What does it return when the source cell is empty?
- Does it still point at the right columns after you insert a row?
Test the formula on one row where you know the answer.
Summaries: SUMIF, QUERY, and ARRAYFORMULA
| Function | Use it to |
|---|---|
| SUMIF | Add values that match one condition |
| QUERY | Group rows and total them with a SQL-like statement |
| ARRAYFORMULA | Apply one formula to a whole column at once |
=SUMIF(B2:B, "Groceries", D2:D)
=ARRAYFORMULA(IF(D2:D="", "", D2:D*1.1))
=QUERY(A1:E, "select B, sum(D) where D is not null group by B label sum(D) 'Total'", 1)Creating charts from your data
Give the chart type, the measure, the grouping, the range, and a title. For example: "Create a column chart of total Amount by Category using the data in A1:E50, with the title "Spending by Category"." Then check the chart type, the series, and the labels.
Exercise
Category is in column B and Amount is in column D. Which formula totals Amount for "Rent"?
Show answer
=SUMIF(B2:B, "Rent", D2:D)