Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fill Empty Cells With The Same Value as Previous Cell in Google Sheet (Array Formula) [duplicate]

I have a list of data that can be seen in this example:

https://docs.google.com/spreadsheets/d/1bRiupsmjfDRE9AgcM_5KJKAyxYKpQiMuyAGSoGaZYN0/edit?usp=sharing

  1. Range A:B is the given data
  2. Range D:E is the desired result

It is very easy to solve it without array formula. But Is there any array formula that can work it out? I need array formula so that i dont have to drag again and again when the data is added below.

like image 953
Randy Adikara Avatar asked Oct 15 '25 19:10

Randy Adikara


2 Answers

use:

=INDEX({A:A, IF(A:A="",, VLOOKUP(ROW(B:B), 
 IF(B:B<>"", {ROW(B:B), B:B}), 2))})

enter image description here

like image 117
player0 Avatar answered Oct 17 '25 11:10

player0


For column B, put in C1

=ArrayFormula(lookup(row(B:B),row(B:B)/if(B:B<>"",1,0),B:B))

enter image description here

like image 32
Mike Steelson Avatar answered Oct 17 '25 10:10

Mike Steelson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!