jmw
Industrial
- Jun 27, 2001
- 7,435
I'm having a problem here with finding a simple function (that does not involve me messing with nested IF functions) to find the nearest values from some data.
A1 contains my value (number, two decimal places).
A2 to A11 contains a list of values in ascending order.
In A12 I want to put the nearest value less than A1's value and in A13 the nearest value that is greater than A1's value.
In the event I get an exact match (unlikely but possible) I need to know what will happen in A12 and A13 so that can then responding with an IF function and modify the subsequent calculations.
I've been trying to figure this out using Hlookup and Index functions but the help directions seem to have been written by Martians and the examples are crap.
Some gentle help for idiots required please.
PS this should be automatic and not require special keystrokes. It should also, if possible, avoid add-ins.
This spreadsheet will be distributed to others to use.
I am writing it in Excel 2002.
JMW
A1 contains my value (number, two decimal places).
A2 to A11 contains a list of values in ascending order.
In A12 I want to put the nearest value less than A1's value and in A13 the nearest value that is greater than A1's value.
In the event I get an exact match (unlikely but possible) I need to know what will happen in A12 and A13 so that can then responding with an IF function and modify the subsequent calculations.
I've been trying to figure this out using Hlookup and Index functions but the help directions seem to have been written by Martians and the examples are crap.
Some gentle help for idiots required please.
PS this should be automatic and not require special keystrokes. It should also, if possible, avoid add-ins.
This spreadsheet will be distributed to others to use.
I am writing it in Excel 2002.
JMW