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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
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,224,867
Messages
6,181,479
Members
453,046
Latest member
Excelvbaexpert

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