Hi, can someone please help me? Here is what I am trying to do:
I have a table of values:
Field1 Field2
1 45
2 16
3 5
I also have a value to look up, but it is in between the values in the table
What I want is to look up the values above and below and save them in 4 new variables (so I can do a particular kind of extrapolation using the four new variables).
For example, if I lookup 1.5, then I would have:
Field1_below = 1
Field1_above = 2
Field1_below = 45
Field1_above = 16
If I lookup 2.5, I would get
Field1_below = 2
Field1_above = 3
Field1_below = 16
Field1_above = 5
Can this be done with some fancy vlookup function?
Ideally this would also be able to recognize if you picked a value above the table, in which case it would populate the "below" fields with the maximum entry and put some kind of flag in the "above" fields.
Eventually this will need to be a macro but I haven't figured out how to do it in the spreadsheet view yet either. Any help would be greatly appreciated!!
Bookmarks