Hi folks,
I thought this would be simpler to figure out...but I can't quite get the result I'm after.
Mini-sheet attached.
Table has Population, Run (First, Second or Third) and a Sample Value.
Goal: User selects/enters population letter in G2, this returns in H2 the sample value from the table and in I2 the run in which the sample value occurred.
Example:
If A selected, then the sample value in column E is 15% and that occurs in the First Run.
If it had been B selected, then the sample would be 50% and that would be from the Third Run.
Note that despite having the same values of 31% in two runs in the table, in the larger dataset, the values are never actually the same when out to final decimal points.
I've tried a combination of INDEX/MATCH/OFFSET and XLOOKUP variations, but can't quite get it right for some reason.
Basically both things have to be matched up, the selected population and the sample for that selected population.
I thought this would be simpler to figure out...but I can't quite get the result I'm after.
Mini-sheet attached.
Table has Population, Run (First, Second or Third) and a Sample Value.
Goal: User selects/enters population letter in G2, this returns in H2 the sample value from the table and in I2 the run in which the sample value occurred.
Example:
If A selected, then the sample value in column E is 15% and that occurs in the First Run.
If it had been B selected, then the sample would be 50% and that would be from the Third Run.
Note that despite having the same values of 31% in two runs in the table, in the larger dataset, the values are never actually the same when out to final decimal points.
I've tried a combination of INDEX/MATCH/OFFSET and XLOOKUP variations, but can't quite get it right for some reason.
Basically both things have to be matched up, the selected population and the sample for that selected population.
Book2 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Population | First | Second | Third | Sample | Selection | Sample | Run | ||||
2 | A | 15% | 31% | 31% | 15% | A | 15% | First | ||||
3 | B | 38% | 57% | 50% | 50% | |||||||
4 | C | 41% | 15% | 53% | 15% | Desired Result: If user selects A, get the sample value | ||||||
5 | from column E, then match that to the | |||||||||||
6 | corresponding run (Row1) and return that | |||||||||||
Sheet1 |