tempmail kds
tempmail kds

Reputation: 31

Fill column with maximum/last value from another column

How can I get the result as in example with ARRAYFORMULA up to last filled cell A?

Example

I can do it with formula in cell C1 =MAX(B$1:B1) but in that case have to copy the formula in each cell in turn.

Upvotes: 1

Views: 49

Answers (1)

JPV
JPV

Reputation: 27242

In C2 try:

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

See this spreadsheet for an example.

Upvotes: 1

Related Questions