Forum Discussion

Benet Gregory's avatar
Benet Gregory
Copper Contributor
Aug 01, 2018
Solved

how do I do this formula in excel?

Can anyone assist with this please? I think it's a combination of formulas beyond my knowledge, but should be pretty simple for an Excel whizz!

I have 2007 version.

I have a table which has two columns. One column has a list of ranges, e.g. 1 - 3, then in the cell below 4 - 6, etc. In the column adjacent I have a number which associates with this range. e.g. 0.2 associates with the range 1-3, then below 0.4 associates with 4-6, etc. There are two other important cells. One has a number in calculated from elsewhere, lets call this cell X1. I would like a formula which looks at the number in cell X1 and decides which range it falls into, and in another separate cell  ,call it Y1, where this formula sits, return the number associated with the range. I.e. if the number in cell X1 is in the range 4-6, cell Y1 returns a value of 0.4. I have attached the table only. Any assistance appreciated! Many thanks...

  • Hi Benet,

     

    Since you don't define what shall be for number like 6.5 it looks like you consider only integers. If translate your range in form as in column B

    the formula could be

    =LOOKUP(F1,$B$1:$B$11,$D$1:$D$11)

    and attached

10 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Hi Benet,

     

    Since you don't define what shall be for number like 6.5 it looks like you consider only integers. If translate your range in form as in column B

    the formula could be

    =LOOKUP(F1,$B$1:$B$11,$D$1:$D$11)

    and attached

    • Benet Gregory's avatar
      Benet Gregory
      Copper Contributor

      That's brilliant Sergei, works perfectly. You made that seem very easy!

      Many thanks, Benet

Resources