I have a very simple question, which unfortunately I can not resolve. Thus would appreciate your help. Here is the thing: I should obtain last column from the range as a range. For example, if I have A26:D32, I should get D26:D32 as a result and input into the loop.
This is the code I have so far:
Function getSmth(CustomCol As Range)
Dim i As Double
For Each cell In CustomCol 'start of the loop. CustomCol here should return D26:D32 already
If cell.Value > i Then
i = cell.Value
End If
Next
....
End Function
What I have tried to do was writing CustomCol.Columns(6), as I know the last column, but it did not work out.
Would really be glad for your help!