Consulting

Results 1 to 9 of 9

Thread: Check if within multiple ranges check problem

  1. #1

    Check if within multiple ranges check problem

    Hi


    I am trying to check if a candidates score is within three marks of the UPPER BOUNDARY of list of numbers. If it is I just need a simple YES (or colour code the cell)


    For eg

    Grade boundaries
    A -B -C -D -E
    9 35 56 99 134


    So if a candidates score was 54 then a YES should appear as the candidate is 2 marks away from a C Grade. However if the candidates scored 11 marks I do not need a YES as I am only interested in the Upper Boundary only ie. if the candidate is within 3 marks of the Higher Grade (than the ones they actually achieved).


    I hope that makes sense and can anyone help? I've attached my test file.
    Attached Files Attached Files
    Last edited by branston; 09-04-2022 at 11:20 AM.

  2. #2
    I am trying something along the lines of

    =IF(B2<=I2+3,HLOOKUP(B2,F2:L3,2,TRUE),"No")
    However this is not checking the whole range just a particular value +3 (ie. I2 + 3).

    Am I along the right lines?

  3. #3
    (Can anyone help… I’ve tried various formations to no avail. I desperately need this for this weekend.)

  4. #4
    maybe try this formula:

    =IF(HLOOKUP(B2,$F$2:$L$2,1,TRUE)>=($J$2-3),"Yes","")

  5. #5
    Thanks arnelgp

    Not sure how the fixed $J$2 reference works. The candidates scores vary so need to look at the whole array rather than comparing with just one value? I attached my test file in post #1 so you can see what I mean.

  6. #6
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,192
    Location
    =IF(HLOOKUP(B2+3,$F$2:$L$3,2,TRUE)<>C2,"YES","")
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved

    Excel 365, Version 2403, Build 17425.20146

  7. #7
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,055
    Location
    Whoa.... Georgiboy. that a good response .
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  8. #8
    Thanks georgiboy - that's awesome!

  9. #9
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,642
    PHP Code:
    =INDEX($F$2:$L$2;MATCH($B2;$F$2:$L$2;1)+1)-4<$B2 

Posting Permissions

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