1
votes

Okay I'm trying to do something simple but yet still it boggles me.

In column A, I have subsections or categories (1 / 2 / 3) etc. In column B, I want to setup a arrayformual to do the following. It will look it column A, and grab the last subsection used. It works when I copy and paste the formula in to each row, but I want to setup as an array so that it automatically fills out the sheet.

=ARRAYFORMULA(
 INDEX(
 INDIRECT("A$1:A" & ROW()),
 MATCH(9.99999999999999E+307,INDIRECT("A$1:A" & ROW()))
 )
 )

Link: https://docs.google.com/spreadsheets/d/1OBPnq2teOif9YcGXShzTonqV1aZpCvCf15DhZC-eAXA/edit?usp=sharing

1

1 Answers

0
votes

Maybe somehting like this:

=ArrayFormula(if(row(A:A) <= max(if(not(isblank(A:A)), row(A:A))),vlookup(row(A:A),filter({row(A:A),A:A},len(A:A)),2),))