Hi,
In this scenario, I need a formula to return a specific value based on (1) a criteria with an exact match, and (2) a range criteria where there is not always an exact match.
Criteria 1
Criteria 2 and 3
The values in the Minimum and Maximum fields may overlap, so the criteria must take into consideration both fields for a good match.
Table 1
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD="align: center"]Year[/TD]
[TD="align: center"]Number[/TD]
[TD="align: center"]Score[/TD]
[/TR]
[TR]
[TD="align: center"]2017[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]3[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
[TABLE="class: grid, width: 400, align: left"]
<tbody>[TR]
[TD="align: center"]Criteria 1
Year[/TD]
[TD="align: center"]Criteria 2
Minimum[/TD]
[TD="align: center"]Criteria 3
Maximum[/TD]
[TD="align: center"]Return Value
Score[/TD]
[/TR]
[TR]
[TD="align: center"]2016[/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]2016[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]2017[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]3[/TD]
[/TR]
</tbody>[/TABLE]
In this scenario, I need a formula to return a specific value based on (1) a criteria with an exact match, and (2) a range criteria where there is not always an exact match.
- Table 1 contains the criteria of the lookup (Year and Number), as well as the value I want the formula to return (Score).
- Table 2 is the dataset containing the Score value along with the associated criteria.
Criteria 1
- The first criteria for the lookup is based on the Year field.
- The year in Table 1 needs to match the year in Table 2.
Criteria 2 and 3
- The second and third criteria for the lookup is based on the Number field in Table 1 and the Minimum and Maximum fields in Table 2.
- The Number value must be greater than or equal to the Minimum field values and must be less than or equal to the Maximum field values.
The values in the Minimum and Maximum fields may overlap, so the criteria must take into consideration both fields for a good match.
Table 1
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD="align: center"]Year[/TD]
[TD="align: center"]Number[/TD]
[TD="align: center"]Score[/TD]
[/TR]
[TR]
[TD="align: center"]2017[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]3[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
[TABLE="class: grid, width: 400, align: left"]
<tbody>[TR]
[TD="align: center"]Criteria 1
Year[/TD]
[TD="align: center"]Criteria 2
Minimum[/TD]
[TD="align: center"]Criteria 3
Maximum[/TD]
[TD="align: center"]Return Value
Score[/TD]
[/TR]
[TR]
[TD="align: center"]2016[/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]2016[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]2017[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]3[/TD]
[/TR]
</tbody>[/TABLE]