View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Function to find last value in a column

hi
you don't really need a function unless you just gotta have one
try something like this.

=OFFSET(A1,COUNTIF(A1:A500,"0")-1,0)

adjust cell references to suit your data.

regards
FSt1

"Andyjim" wrote:

Hi-

I submitted this post without entering anything on the subject line. So I
am re-entering this. I need to create a function that can be placed in a
cell that will display the last number in another column. Below are some
attempts, but no success. Thanks for your help!

Andy


Function LastValue(lastno As Variant)

Dim sysexpcol As Range
Set sysexpcol = Range(ad16, ad56)


Set lastno = sysexpcol(Cells.Value.xlDown)



End Function

Function lastvalueincolumn(foundcell As Variant)

With Worksheets("analysis").Range("ad:ad")
Set foundcell = .Cells.Find.Value.xlDown
End With
End Function