Una familia de software de hoja de cálculo de Microsoft con herramientas para analizar, trazar y comunicar datos.
En tus especificaciones algunos rangos se solapan y hay huecos, esto es muy extraño. Y tienes algunos resultados erróneos.
Esta función hace lo que quieres.
Cópiala en un modulo estándar y llámala desde la hoja así: Rangos(celda1; celda2)
Tendrás que modificar, en su caso, en el código la posición de la tabla1.
Function Rangos(L1 As Double, L2 As Double) As String
Dim j As Integer
Dim H As Worksheet
Set H = Worksheets("Sheet1") ' corregir el nombre de la hoja
With H
Rangos = vbNullString
For j = 1 To 9 ' supongo que la tabla1 está en las filas 1 a 9, columnas 1 a 3
If L1 >= .Cells(j, 2) And L1 <= .Cells(j, 3) Then
Rangos = .Cells(j, 1)
Exit For
If L1 <= .Cells(j, 3) Then
Rangos = .Cells(j, 1)
Exit For
End If
End If
Next j
For j = 1 To 9
If L2 >= .Cells(j, 2) And L2 <= .Cells(j, 3) Then
If .Cells(j, 1) = Rangos Then
'
Else
Rangos = Rangos & "-" & .Cells(j, 1)
End If
End If
Next j
End With
End Function