michaelhunter
Board Regular
- Joined
- May 1, 2006
- Messages
- 79
Hi folks,
GG26:GR26 contains simple formulas that produce values ranging from about 10 to 60 or so. These values change day to day.
GG27:GR27 also contains simple formulas that produce values ranging from 1 to 12. For example:
32 42 14 54 59 44 17 23 31 58 39 42
01 02 03 04 05 06 07 08 09 10 11 12
5
In GG28 I need the value in GG27:GR27 that corresponds to the highest one in GG26:GR26. In the example above, 59 is the highest value in GG26:GR26 and the number 5 is the corresponding value in GG27:GR27.
So in GG28 I have the formula:
=IF(ROWS($GG$28:GG28)<=COUNTIF($GG$26:$GR$26,MAX($GG$26:$GR$26)),
INDEX($GG$27:$GR$27,SMALL(IF($GG$26:$GR$26=MAX($GG$26:$GR$26),
COLUMN($GG$27:$GR$27)-COLUMN($GG$27)+1),ROWS($GG$28:GG28))),"")
entered with control+shift+enter and it returns the correct value: 5.
Now, in GH28 I need the value in GG27:GR27 that corresponds to the SECOND highest one in GG26:GR26. In the example, 58 would be the second highest value in GG26:GR26 and the corresponding value in GG27:GR27 is 10.
So in GH28 I would need that value: 10.
How can I modify the above formula to get it?
I've tried following a suggestion in a previous post but I haven't been able to make the right adjustment.
Once I know how to modify the formula, I think I can get the third, fourth and so on.
I would appreciate your suggestions.
GG26:GR26 contains simple formulas that produce values ranging from about 10 to 60 or so. These values change day to day.
GG27:GR27 also contains simple formulas that produce values ranging from 1 to 12. For example:
32 42 14 54 59 44 17 23 31 58 39 42
01 02 03 04 05 06 07 08 09 10 11 12
5
In GG28 I need the value in GG27:GR27 that corresponds to the highest one in GG26:GR26. In the example above, 59 is the highest value in GG26:GR26 and the number 5 is the corresponding value in GG27:GR27.
So in GG28 I have the formula:
=IF(ROWS($GG$28:GG28)<=COUNTIF($GG$26:$GR$26,MAX($GG$26:$GR$26)),
INDEX($GG$27:$GR$27,SMALL(IF($GG$26:$GR$26=MAX($GG$26:$GR$26),
COLUMN($GG$27:$GR$27)-COLUMN($GG$27)+1),ROWS($GG$28:GG28))),"")
entered with control+shift+enter and it returns the correct value: 5.
Now, in GH28 I need the value in GG27:GR27 that corresponds to the SECOND highest one in GG26:GR26. In the example, 58 would be the second highest value in GG26:GR26 and the corresponding value in GG27:GR27 is 10.
So in GH28 I would need that value: 10.
How can I modify the above formula to get it?
I've tried following a suggestion in a previous post but I haven't been able to make the right adjustment.
Once I know how to modify the formula, I think I can get the third, fourth and so on.
I would appreciate your suggestions.
Last edited: