PDA

View Full Version : Excel



10-06-1999, 11:52 PM
I regularly use the VLOOKUP function within my Excel sheets. Depending on the data entered, the value that is looked up may, or may not have an exact match within the lookup range. While on some occasions the functions behaviour of returning the nearest lower match can be beneficial, on others I need to find the nearest higher match. I can achieve this by adding an extra column to the lookup table and using the MATCH function to identify the value I require, however it is somewhat clumsy. Can a function, similar to VLOOKUP, be witten with VBA that returns the nearest higher value when there is no exact match?