I have tried searching for this but with no joy. Any help would be appreciated.

I have a very large table of data where each record shows a value for a particular variable (CO2 emissions in this case) and that value will fall into one of 15 possible categories where each category relates to a range of values. The lowest category is for any value below 50 and the highest for any value greater than 255. The size of each category in between is not uniform with some being wider than others.

So, i need a formula or possibly VBA code which checks the CO2 value - say 176 - and finds the corresponding category which would be K in this case. I don't think that I can use nested if functions or the formula would be huge.

Thanks.

Ian Ha