Hello everyone,
In the formula in this example sheet, I can look on multiple sheets (indirect) what value in col D belongs to a value in col E. The value from col E is inserted in cell A16.
In this case, we are searching with value 30. Value 30 can belong to cell D3 (Right), or cell D8 (wrong).
I would like to add a filter, so I always get the the right value I want.
Column F always contains numbers that go from small to large. I would like to build in a min/max filter so that the search does not go beyond the minimum and maximum values in column F. These minimum and maximum values are in cells C20 and C21.
So, if a the min is 1, and max is 5, we will NEVER get the wrong value as the corresponding value is 8.
Hope you understand my question, thanks in advance.
In the formula in this example sheet, I can look on multiple sheets (indirect) what value in col D belongs to a value in col E. The value from col E is inserted in cell A16.
In this case, we are searching with value 30. Value 30 can belong to cell D3 (Right), or cell D8 (wrong).
I would like to add a filter, so I always get the the right value I want.
Column F always contains numbers that go from small to large. I would like to build in a min/max filter so that the search does not go beyond the minimum and maximum values in column F. These minimum and maximum values are in cells C20 and C21.
So, if a the min is 1, and max is 5, we will NEVER get the wrong value as the corresponding value is 8.
Sandbox.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Sheet2 | 10 | 1 | |||||
2 | Sheet3 | 20 | 2 | |||||
3 | Sheet4 | Right | 30 | 3 | ||||
4 | 40 | 4 | ||||||
5 | 50 | 5 | ||||||
6 | 10 | 6 | ||||||
7 | 20 | 7 | ||||||
8 | Wrong | 30 | 8 | |||||
9 | 40 | 9 | ||||||
10 | 50 | 10 | ||||||
11 | ||||||||
12 | ||||||||
13 | ||||||||
14 | ||||||||
15 | ||||||||
16 | 30 | |||||||
17 | ||||||||
18 | ||||||||
19 | ||||||||
20 | 1 | |||||||
21 | 5 | |||||||
Sandbox |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C16 | C16 | =IFERROR(INDEX(INDIRECT("'"&INDEX($A$1:$A$3,MATCH(TRUE,COUNTIF(INDIRECT("'"&$A$1:$A$3&"'!E1:E100000"),A16)>0,0))&"'!D1:D100000"),MATCH(A16,INDIRECT("'"&INDEX($A$1:$A$3,MATCH(TRUE,COUNTIF(INDIRECT("'"&$A$1:$A$3&"'!E1:E100000"),A16)>0,0))&"'!E1:E100000"),0)),"") |
Hope you understand my question, thanks in advance.