Thanks:  0
Likes:  0

# Thread: 2nd highest score analysis using vlookup or macros

1. ## 2nd highest score analysis using vlookup or macros

Hello,
I have stumbled upon quite difficult task, maybe you could give me a hand at solving this task though.
SCORES OF STUDENTS
 A1 SCORE SCORE SCORE SCORE SCORE SCORE SCORE RESULT ALAN 50 60 70 90 50 65 60 FALSE BORIS 56 60 70 95 50 60 72 TRUE CLIVE 60 62 90 80 40 60 70 TRUE DENVER 50 100 90 70 60 80 77 FALSE EZAN 60 95 90 80 50 51 75 TRUE

If H2 >2nd highest number result should be TRUE

1.If 2nd highest number is before 1st highest number ignore it and consider numbers which falls after 1st highest
(here Alan scored 70 marks which is 2nd highest. but it falls before 1st high = 90. consider 65 as 2nd highest and ignore 70 which was before 1st high score)
2.If 2nd highest falls immediately after 1st highest score, ignore that 2nd highest.
(Here Denver scored 90 which is 2nd highest but it falls immediately after 1st score. so consider 80 as 2nd highest)
3.If its a decrement value, dont consider any of the above values till we get an incremental value
(Here EZAN scred 95-90-80 but its in decremental series. so, 1st highest is 95 and 2nd highest is 51 and not 90 or 80)
4.Before 2nd highest number there should be a number which is lesser (Clive 2nd highest 70 . before that 60 which is lesser)
I really hope you can help.
Thank you

2. ## Re: 2nd highest score analysis using vlookup or macros

What number is to be chosen if all numbers after the peak are decremental?

3. ## Re: 2nd highest score analysis using vlookup or macros

Result should be false.
3.If its a decrement value, dont consider any of the above values till we get an incremental value
(Here EZAN scored 95-90-80 but its in decremental series. so, 1st highest is 95 and 2nd highest is 51 and not 90 or 80)
if its fully a decremental set of value result should be false
In EZAN score, 3 decremental follow by one increase.

4. ## Re: 2nd highest score analysis using vlookup or macros

This works on your example data:
Code:
`=LARGE(IF(B2:H2 < A2:G2,"",B2:H2),2)=H2`
confirmed with CTRL+SHIFT+ENTER

5. ## Re: 2nd highest score analysis using vlookup or macros

Thank you BJUNGHEIM
Its not working correctly.
For a new set of numbers
80,63,54,49,59,56,52 i'm getting #NUM! error
19,14,17,22,32,28,29
I am getting TRUE.
32 = 1st
29 =value which we are going to check
how this can be TRUE?

6. ## Re: 2nd highest score analysis using vlookup or macros

Originally Posted by relianceaaa
Thank you BJUNGHEIM
Its not working correctly.
For a new set of numbers
80,63,54,49,59,56,52 i'm getting #NUM! error
19,14,17,22,32,28,29
I am getting TRUE.
32 = 1st
29 =value which we are going to check
how this can be TRUE?
For the first set, I'm not getting an error, but I took a closer look and if the scores are in order decending it will return a #NUM! error.

Code:
```=IFERROR(LARGE(IF(B6:G6 < A6:F6,"",B6:G6),2)
```
(again entered with CTRL+SHIFT+ENTER)

EDIT: This won't ignore 2nd highest figures preceding a high score...more research is needed.

7. ## Re: 2nd highest score analysis using vlookup or macros

i'm getting a message like...
Your formula is missing a parenthesis--) or (.check the formula, and then add the parenthesis in the appropriate place.

8. ## Re: 2nd highest score analysis using vlookup or macros

Sorry, forum code cut off the end of my formula:
Code:
`=IFERROR(LARGE(IF(B7:G7 < A7:F7,0,B7:G7),2) < H7,FALSE)`

9. ## Re: 2nd highest score analysis using vlookup or macros

for continuous decrease in scores or increase in scores, answer is TRUE.
(1,2,3,4,5,6,7
or
100,90,80,70,60)
moreover in many places its giving wrong answers.
can we easily fix it?

10. ## Re: 2nd highest score analysis using vlookup or macros

The more I look at it the more I believe that it cannot be done in a single formula...at best I think you'd need 6 helper columns...let me know if that's a direction you're willing to go and I'll take a look.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•