Premium Google Sheets drill · Arrays
ARRAYFORMULA labels, skipping blanks
Practice Google Sheets ARRAYFORMULA with IF so blank product rows stay blank and the other rows spill a label.
A2:A4 are product names and one cell is blank. B2:B4 are quantities. A blank cell matches "" in a Sheets comparison.
In C2, use ARRAYFORMULA and IF so each filled name spills as Name x Qty, and the blank name stays blank.
Dataset
Starter sheet. Cells marked formula are where the formula goes.
| Row | A | B | C |
|---|---|---|---|
| 1 | Product | Qty | |
| 2 | Pen | 2 | Formula goes in C2. formula |
| 3 | 9 | ||
| 4 | Book | 1 |
Hint
The test is A2:A4="". When that is true, return an empty string.
Explanation
IF sees the blank in A3 and returns an empty string there. Pen and Book spill as Pen x 2 and Book x 1. The blank match ignores capitalization of any text that is present.
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.