View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Allison[_2_] Allison[_2_] is offline
external usenet poster
 
Posts: 4
Default Finding first non-blank cell

This VBA was great for returning the last value in a
column, but that's not what I wanted. Thanks anyway for
trying to help.

Allison

-----Original Message-----
Create the following function in a standard module:

Function LastValue(r As Range)
With r
LastValue = .Parent.Cells(65536, .Column).End

(xlUp).Value
End With
End Function

In the Z column enter the following to get the last value

in column D

=LastValue(D:D)

--

John Green - Excel MVP
Sydney
Australia


"Allison" wrote in

message ...
Excel 2002

I need to return in column Z the last non-blank value in
columns D, F, H, J, L, N, P, R, T, V, X (every other
column starting with D) [or conversely, the first non-
blank working backward from column z and hitting every
other column].

I can use nested IF statements using ISBLANK(X3), but

only
up to 7 and I need 11.

What formula (or VBA if a formula isn't possible) could

I
use to accomplish this?

Thanks for any help!



.