View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default ShowMe function works fine except I need the offset to adjustdepending on column

Hi
I could not find a question....
regards
Paul

On Nov 25, 6:07*pm, " wrote:
Can someone point me in the right direction for this?

Function Showme(rngSrc As Range) As String
* *Dim rng As Range, rngMin As Range, dbl As Double, rngLeft As Range
* *Dim intOffset As Integer

* *Set rngMin = rngSrc.Cells(1, 1)
* *dbl = rngMin.Value
* *For Each rng In rngSrc
* *If rng.Value < dbl Then
* * * Set rngMin = rng
* * * dbl = rngMin.Value
* *End If
* *Next

* *'Showme = rngMin.Address
* *Set rngLeft = rngMin.Offset(, -3).Cells(1, 1)
* *'MsgBox rngMin.Address
* *'MsgBox rngLeft.Address
* *'MsgBox rngLeft.Value

* *Showme = rngLeft.Value

End Function