Hello,
I defined two dynamic ranges (names) through INDIRECT like this:
SampleNames=INDIRECT("Main!$D$2:$D$"&Control!$C$2)
SampleAverages=INDIRECT("Main!$H$2:$H$"&Control!$C$2)
where the end of the range is specified by Control!$C$2
Now I want to use these names and get the averages for specific samples, but some samples exist more than once, and I want to get a spill of all available averages. I was thinking to use INDEX within AGGREGATE, but it doesn't work, but maybe I'm overthinking this or missing something:
B2=AGGREGATE(15,3,INDEX(SampleAverages,(SampleNames=A2)/(SampleNames=A2),1),3)
I put 3 for the count, but I was also wondering what the best way is to put a counter for k?
(There are other columns in the actual data, but I'm skipping here.)
I would appreciate any input!
I defined two dynamic ranges (names) through INDIRECT like this:
SampleNames=INDIRECT("Main!$D$2:$D$"&Control!$C$2)
SampleAverages=INDIRECT("Main!$H$2:$H$"&Control!$C$2)
where the end of the range is specified by Control!$C$2
Now I want to use these names and get the averages for specific samples, but some samples exist more than once, and I want to get a spill of all available averages. I was thinking to use INDEX within AGGREGATE, but it doesn't work, but maybe I'm overthinking this or missing something:
B2=AGGREGATE(15,3,INDEX(SampleAverages,(SampleNames=A2)/(SampleNames=A2),1),3)
I put 3 for the count, but I was also wondering what the best way is to put a counter for k?
Book1 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | Names | Averages | |||||||||
2 | test1: | test1 | 13 | ||||||||
3 | test2 | 89 | |||||||||
4 | test3 | 39 | |||||||||
5 | test1 | 13 | |||||||||
6 | test1 | 13 | |||||||||
7 | test6 | 58 | |||||||||
8 | test7 | 19 | |||||||||
9 | |||||||||||
Sheet1 |
(There are other columns in the actual data, but I'm skipping here.)
I would appreciate any input!