formula for a # in a column of #'s that's closest to a certain val
Don wrote:
I'm looking for a function or formula in Excel that will find a number in a
range of numbers that is closest to a specified number. Example: I have a
column of 7 cells that contain cummulative percentages from 0 - 100. It will
always be theses same cells, but will have varying percent values depending
on other calculations. I need to find the first number that's closest to and
below 10. I also need to find the first number that's closest to and above
10. I need this for 3 other values (40, 50, & 90)as well, but if I can get
an example of a formula, I could probably go from there.
Thanks in advance for the help!
Hi Don
Try this in your result cell:
=VLOOKUP(10,$A$1:$A$7,1,TRUE)
Copy it down three cells and amend the 10 to 40, 50 and 90
respectively.
Note that you can make the "10" a reference to another cell so that you
could change that cell rather than amending the formula in the future.
Regards
Steve
|