Get the next non-blank cell above a cell in Google Sheets

Michelleaneous

New Member
Joined
Feb 16, 2024
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hello,

What should be the formula to use in C3 in order to look up for the last non-blank above A3?

In Col D is the desired result

Excel Query.png
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Not sure if this works in sheets, but try
Excel Formula:
=LOOKUP(2,1/(A$2:A2<>""),A$2:A2)&" - "&B2
 
Upvote 0
It did work, however, it will give me an NA if i drag the formula so I have to adjust every cell
 
Upvote 0
There should be no need to adjust the formula if you have anchored the ranges as I showed.
 
Upvote 0
Thanks for checking on this. Could you please check what I did wrong? It's still showing NA errors for the rows with blank cells in Col A after dragging the formula down
1708342437012.png


1708342476953.png
 
Upvote 0
Ok, it appears that lookup works differently in Sheet, try
Excel Formula:
=INDEX(A$1:A1,MATCH("zzzz",A$1:A1))& " - "&B1
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,927
Messages
6,175,438
Members
452,641
Latest member
Arcaila

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top