Find the last non-blank value in a column

WildAngus

New Member
Joined
Jan 10, 2007
Messages
28
Can anyone tell me how to quickly return the LAST non-blank value in a column please?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

WildAngus

New Member
Joined
Jan 10, 2007
Messages
28
Thanks for the reply, but I'm still not getting this...

I have entries in column H starting H8, H9, H10 etc
If H42 is the last value for example, then I want to retun this value at the top of the row.
i.e. Cell H7 (result) would return the value in cell H42.

It sounds like there should be a simple way in excel, but I'm not sure how the formula in the link can do this.
 
Upvote 0

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,872
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
=indirect("H" & MAX(MATCH(9E+220,H:H),MATCH(REPT("z",150),H:H)))

this should be independent of the data type in H

oops : it will return an error ... it will work if you have both text and number type of data in H

for text in H: =indirect("H" & MATCH(REPT("z",150),H:H))
for numbers: =indirect("H" & MATCH(9E+220,H:H))

call if you need it to be universal.
 
Last edited:
Upvote 0

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Just for fun, I would probably use code
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Row < 8 Then Exit Sub
If Target.Column <> 8 Then Exit Sub
If Target.Row = Cells(Rows.Count, "H").End(xlUp).Row Then Cells(7, 8) = Target
End Sub
This will update H7 when ever a new value is added to the column
lenze
 
Upvote 0

Forum statistics

Threads
1,191,165
Messages
5,985,040
Members
439,935
Latest member
Monty238

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
Top