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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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
=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
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,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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