Function
Eddie ... (Hi)
Code copied into new Module ... However, I do not know how to write against
the new Function (abovei) ... =abovei(?????) ... "I" codes are in Col E & I
need to return "Qty" from Col "W".
Thanks ... Kha
"HelpExcel.com" wrote:
Ken,
Following is a UDF that should work. Insert a blank module in your workbook
and copy in the following code:
Public Function aboveI(rngI As Range, rngNum As Range) As Variant
If rngI.Value < "i" Then
aboveI = ""
Exit Function
End If
Do Until rngI.Value < "i"
Set rngI = rngI.Offset(-1)
Loop
aboveI = rngI.Parent.Cells(rngI.Row, rngNum.Column).Value
End Function
Regards,
Eddie
HelpExcel.com
|