Function vlookups(val As Range, min As Range, max As Range, col As Range) As String Dim cl As Range For Each cl In min If val.Value >= cl.Value And val.Value <= cl.Worksheet.Cells(cl.Row, max.Column) Then vlookups = cl.Worksheet.Cells(cl.Row, col.Column) Exit For End If Next End Function使い方:
=vlookups(E4,$A$1:$A$4,$B$1:$B$4,$C$1:$C$4)
結果:
0 件のコメント:
コメントを投稿