0
0
Google Sheetsspreadsheet~10 mins

PivotTable formatting in Google Sheets - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data by region and product

CellValue
A1Region
B1Product
C1Sales
A2North
B2Apples
C2100
A3North
B3Oranges
C3150
A4South
B4Apples
C4200
A5South
B5Oranges
C5120
Formula Trace
QUERY(A1:C5, "select A, sum(C) group by A pivot B", 1)
Step 1: QUERY(A1:C5, "select A, sum(C) group by A pivot B", 1)
Cell Reference Map
  A       B        C
1 Region  Product  Sales
2 North   Apples   100
3 North   Oranges  150
4 South   Apples   200
5 South   Oranges  120

Formula references A1:C5 for data input.
The formula uses the data range A1:C5 containing Region, Product, and Sales.
Result
  E        F        G
1 Region  Apples  Oranges
2 North   100     150
3 South   200     120
The pivot table shows Regions in column E, with Apples and Oranges sales as columns F and G.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the 'pivot B' part of the formula do?
AIt creates columns for each unique Product
BIt sums all sales without grouping
CIt filters only Apples sales
DIt sorts data by Region
Key Result
QUERY(data_range, "select column1, sum(column3) group by column1 pivot column2", header_rows)