In this case, I'd like a formula to display 8 at the top of the workbook. This is for a checkbook where it will always show the current balance at the top. I could put a formula in place of the blank data to make it easier.
I tried =INDEX(A7:A100,COUNTA(A1:A100),1) but returns 0 since there are no entries after A5.
Any ideas? Thanx! Drew
|Check out our Excel VBA Resources|
Here is a User Defined Function for your needs. If you put this in a module in the workbook you are in or your personal workbook, and then use the formula:
This will return the last number in column A, use B for B and so on.
Let me know if this fits your needs!
If ActiveCell.Column = col Then
LastNum = Range(col & ActiveCell.Row - 1).End(xlUp).Value
LastNum = Range(col & "9999").End(xlUp).Value