I have two lists.
- List with account numbers
- List with account groups and min + max ranges
I want a function that assigns the numbers from the first list to the correct category in the second list if the number is within the respective range.
I found the solution in Excel and could not find a suitable way to implement this in Pigment. Here is the Excel solution:
=INDEX($D$2:$D$6, MATCH(TRUE, ($E$2:$E$6 <= A2) * ($F$2:$F$6 >= A2), 0))
- INDEX($D$2:$D$6): This part selects the Category column.
- MATCH(TRUE, ($E$2:$E$6 <= A2) * ($F$2:$F$6 >= A2), 0): This part finds the row where the number in column A falls within the Min and Max range.
I tried to use the MATCH function with some IF clauses, but that was not possible. Also the IN function could help with ranges, but I haven’t found a way to combine it with the MATCH function.
Is there any way to realize this with Pigment? If not, maybe that could be helpful in the future.