Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function maxsuche(zahl As Double, feld_sT As Range) As Double
- Dim i, j As Integer
- Dim a, b, c As Double
- Dim bereich As Range
- '=maxsuche(AP6-5;AP8:AP368)
- Set bereich = feld_sT
- b = zahl
- c = 1
- For i = 1 To bereich.Rows.Count
- If c = 1 Then
- a = bereich(i, 2).Value
- bereich(i, 2).Cells.Select
- If a > b Then
- c = bereich(i, 1).Value
- c = Round(c, 0)
- End If
- End If
- Next i
- maxsuche = c
- End Function
Add Comment
Please, Sign In to add comment