View Single Post
  #2   Report Post  
Gary''s Student
 
Posts: n/a
Default

Enter this UDF:

Function last_used_value(R As Range) As Variant
Dim rr As Range
last_used_value = 0
For Each rr In R
If rr.Value = "" Then
Else
last_used_value = rr.Value
End If
Next
End Function

This function will report the last filled value in a range that is not
blank. The range can be any block of cells, rows, columns, etc. Use it like:

=last_used_value(E2:H7) to get the last used value in the block.
--
Gary's Student


"samfw" wrote:

I need to write a formula in one cell that inserts the last used value from a
range of cells. My range of cells represents monthly values. So, for
example, if I have only posted values through July then only the first seven
cells will have values and the value I want to insert is the July or 7th
value.