How can I match a random number with closest number from sequence?
For instance, if I have the following list (my list is 255 numbers long):
A B
..7 Red
1.2 Orange
2.6 Brown
3.5 Grey
4.3 Yellow
5.5 Red Orange
and I enter 3.2 into C1, I would like for d1 to return 3.5 (the closest
number to 3.2 from sequence). That's the main thing (remember I have 255 of
these and I think excel only lets you nest 7 if's)
Once the correct match is match, I would also like to display the color it
is associated with (each of the 255 combinations has its own color)
So, after it finds the 3.5 match from the 3.2 input, I would like another
cell to display Grey.
As another example, an input of 5.0 would return 5.5 and Red Orange.
Thanks for the help.
|