Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Returning value based on input data
I am trying to write a formula or VBscript that will accomplish this seemingly simple task: In CELL A I want to enter a value, in this case the price of diesel fuel per gallon. I then want to compare that value against a table that contains 3 columns ABC and return a value base on that comparison, for example: Current Diesel Price = x if x is greater than w but less than y return value z. and if thats false check the next row in the table until true. the lookup table looks like this greater than less than charge % 1.00 1.05 14% I need a single line for entry and a single result line, such as: (user enters this value) D.O.E. PRICE: 2.654 (formula returns this value) FSC% 16.50% I need it to look up the value from a table on another sheet formated as: DOE Price at least less than FSC% 2.31 2.32 14.0 2.32 2.33 14.1 2.33 2.34 14.2 2.34 2.35 14.3 2.35 2.36 14.4 2.36 2.37 14.5 2.37 2.38 14.6 Thanks for any help. -- mtroute ------------------------------------------------------------------------ mtroute's Profile: http://www.excelforum.com/member.php...o&userid=33562 View this thread: http://www.excelforum.com/showthread...hreadid=533483 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
return multiple rows of data based on criteria | Excel Worksheet Functions | |||
Clear"Reset" data input. | Excel Worksheet Functions | |||
Pull data from another sheet based on certain criteria | Excel Discussion (Misc queries) | |||
Printing data validation scenarios | Excel Worksheet Functions | |||
populating sheets based on data from parent sheets | Excel Discussion (Misc queries) |