Hi guys,
Below is my function.
I want to return to the sub routine the two values found from the funciton TRw & BRw
How do i do this?
Sub Test
Function(iRow,iCol) 'Send these cell details to function Range - which should return the values of the Top Row and Bottom Row of the sent cell
End Sub
Function Range(Rw, Col)
Dim i As Integer
Dim TRw, BRw As Integer
i = 0
Do Until Cells(Rw + i, Col).Borders(xlEdgeTop).LineStyle = xlContinuous
i = i + 1
Loop
TRw = Rw - i
i = 0
Do Until Cells(Rw - i, Col).Borders(xlEdgeBottom).LineStyle = xlContinuous
i = i + 1
Loop
TRw = Rw + i
End Function
Regards
Jordan
Bookmarks