Dim W1() As Long
Dim Idx1 As Double
Dim LB1 As Double
W1 = Array(0.433, 0.572, 0.65, 0.724, 0.75, 0.866, 0.95, 1.008, 1.108, 1.157, 1.22, 1.302, 1.41, 1.5, 1.524, 1.553, 1.63, 1.65, 1.732, 1.747, 1.78, 1.8, 1.9, 2, 2.02, 2.032, 2.12, 2.217, 2.35, 2.36, 2.45, 2.5, 2.595, 2.73, 2.886, 2.995, 3.09, 3.177, 3.3, 3.468, 3.56, 3.58, 3.666, 3.9, 4.091, 4.4, 4.773, 5.35, 5.525, 5.7, 6.007, 6.3, 6.9, 6.91, 7.55, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 13, 14, 16, 20)
For LB1 = 1 To UBound(W1)
If Abs(B1 - W1(LB1)) < Abs(B1 - W1(Idx1)) Then Idx1 = LB1
Next