New Contributor

# I think I am missing something

I hope that someone can point me in the right direction, I am trying to work out how to return a value when a number falls between to numbers. For example, if months fall between 36 and 39 in cell C6, then show 100 in a cell D6. of the months fall between 40 and 48 in cell C6 then show 80 in cell D6. and so on.

IS this possible as I will be honest I am only really starting to delve into excel and trying to learn things on the fly.

Cheers Rob

2 Replies

# Re: I think I am missing something

I'd create a small lookup table with the thresholds such as 36 and 40 in the first column, and the value to return in the second column. In the screenshot below, I used F2:G8 for this purpose, but you can place it anywhere, even on another worksheet. I added some extra rows as example, you'd have to change those to match your setup.

The formula in D6 is

``=VLOOKUP(C6,\$F\$2:\$G\$8,2)``

This can be filled down if required.

# Re: I think I am missing something

Thank you so much that works a treat and will help me learn a little more about Excel

Rob