First non blank cell value above formula.

VytautasM

New Member
Joined
Jan 31, 2020
Messages
33
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
Good day,

I have a column of data, and I need to find the previous non-blank cell value. For example, if I have the following data:

book
need to find A1 (book)
car
need to find A5 (car)
dog
need to find A8 (dog)
need to find A9 (dog)

I want the (formula) cell to find a reference to the cell containing "book" no matter how many blank cells are inserted between them. It is possible that new rows with blank cells in the column could be inserted between the formula row and the previous non-blank row at any time, and the formula should be able to handle that.

Ideally, I would like to be able to put the formula in any cell on a row to find the nearest non-blank cell above that row in, say, column A.

Tried many option, but non seem to work for my needs.

Any suggestions would be greatly appreciated.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
How about

+Fluff New.xlsm
AB
1
2BookBook
3Book
4Book
5Book
6CatCat
7Cat
8Cat
9DogDog
10Dog
Data
Cell Formulas
RangeFormula
B2:B10B2=LOOKUP(2,1/(A$2:A2<>""),A$2:A2)

Fluff,

I need the formula to go in the same column as the values. In your example the formula would need to good in A3, A4, A5 and read book, in A7, A8 and read cat, in A10 and read dog.
 
Upvote 0
You can still use that formula, just put it in whatever cells you want.
 
Upvote 0
Your right, sorry about that.

And thank you for a fast solution.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,528
Messages
6,125,342
Members
449,218
Latest member
Excel Master

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