Perform a Vlookup + if

Hello,

I want to check the amount inputted in column amount if the amount is valid, and then place the result of the validation in col amount_is_valid.
In the example provided below, the user with the code xxx can only use amounts between 30-99 because the intervals_of_values is = 1.

sheet1:

code | amount | amount_is_valid

xxx | 30 | yes

xxx |200 | no

sheet2:

code | intervals_of_values

xxx | 1
yyy | 2
zzz | 3

For the intervals_of_values column:
1: User can use amounts between 30-99
2: User can use amounts between 100-499
3: User can use amounts over 500

Can someone help with the function that should be in the column amount_is_valid pls?

Example: demo.ods

Attachment 2:
demo-kdev.ods

Please edit your question and add a sample file with instruction about you want to achieve and where.

Hi, just added the sample file. Thank you.

I hope you can do something with the file.

kdev test.ods

I tried to reproduce this in my main workbook but it’s giving N/A . I checked and the references of the formula follow the logic of your example but I don’t know why it’s not working. I’ve attached the file as Attachment 2

I checked and the references of the formula follow the logic of your example but I don’t know why it’s not working

Quite simply, everything under 30 will not be found.

kdev test 2.ods

I see, Thank you