Hi demuro,
Try this function code in a standard module (open VB Editor, click Insert -> Module, paste the code shown below). In your worksheet, use the formula
=Adjust(C11) (or any other cell reference)
Note that if you change A16 or A29, you'll have to perform a full sheet calculation (CTRL+ALT+SHIFT+F9) for any existing '=Adjust()' formulas to update properly. Also note that because you used ">" and "<" (not ">=" and "<=") there are gaps in the ranges, e.g. 21-85, 88-452.. what happens if the value is 86 or 87? The way it's coded, it will stay 86 or 87. If you need to adjust the code to be all-inclusive of the consecutive ranges, just change the numbers in the Case statements as necessary.
Bookmarks