Forum Discussion

Tomaz9x's avatar
Tomaz9x
Copper Contributor
Dec 21, 2022
Solved

Lookup for value between two values

Hi Guys/Girls,

 

I have big problem for me but small for you, I hope.

 

I have 2 tables, in first one I have registered some values and I would like to get one value from the second table:

my first table:

 

my second table:

 

In first table in column 7 is value (405) which I have to find in second table and return value from 12 column in second table to column 8 into first table.

 

For my example this value would be 20 as value 405 is between 241 and 480.

 

Could someone help me construct formula for that?

 

Thanks in advance,

Tomaž

 

 

 

  • Tomaz9x since you seem to be working in the R1C1-reference style that ould be like in the first picture below.

     

    Formula used:

    =LOOKUP(RC[-1],RC[2]:R[2]C[2],RC[4]:R[2]C[4])

    If, on the other hand you would chose for the default reference style, you would end up with a formula like this:

    =LOOKUP(G1,J1:J3,L1:L3)

     

2 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Tomaz9x since you seem to be working in the R1C1-reference style that ould be like in the first picture below.

     

    Formula used:

    =LOOKUP(RC[-1],RC[2]:R[2]C[2],RC[4]:R[2]C[4])

    If, on the other hand you would chose for the default reference style, you would end up with a formula like this:

    =LOOKUP(G1,J1:J3,L1:L3)

     

    • Tomaz9x's avatar
      Tomaz9x
      Copper Contributor
      Hello Riny_van_Eekelen,
      I was thinking how to compare between two columns, but now I see that is enough if I search just by one column.
      Regards
      Tomaz

Resources