Premium Google Sheets drill · Arrays
Build a header with an array literal
Practice a Google Sheets array literal that places an Item and Qty header above two data columns.
A header row and the data under it can be one array literal. The semicolon starts the data row, and commas place columns side by side.
In D2, spill a table whose first row is Item and Qty, followed by A2:A4 beside B2:B4.
Dataset
Starter sheet. Cells marked formula are where the formula goes.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 2 | Pen | 2 | Formula goes in D2. formula | ||
| 3 | Book | 5 | |||
| 4 | Clip | 1 | |||
| 5 |
Hint
The header is {"Item", "Qty"; and then the two ranges.
Explanation
The literal's first row is the two labels. The semicolon stacks A2:A4 next to B2:B4 underneath, so Pen, Book, and Clip spill with their quantities.
The interactive sheet and a worked solution are part of Formula Drills Premium. The instructions and starter data on this page are the full problem.