Skip to content

Instantly share code, notes, and snippets.

@mrspartak
Created October 14, 2015 11:48
Show Gist options
  • Select an option

  • Save mrspartak/77c6fd1b53c83483d01e to your computer and use it in GitHub Desktop.

Select an option

Save mrspartak/77c6fd1b53c83483d01e to your computer and use it in GitHub Desktop.
Function FindInRangeValue(Diapazon As Range, Values As Range, Search) As String
Dim row As Range
For Each row In Diapazon.Rows
If row.Columns(1).Value <= Search Then
If row.Columns(2).Value >= Search Then
FindInRangeValue = Values.Rows(row.row).Value
End If
End If
Next row
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment