PDA

View Full Version : [SOLVED:] Check if within multiple ranges check problem



branston
09-04-2022, 09:44 AM
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.

branston
09-04-2022, 10:35 AM
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?

branston
09-04-2022, 02:14 PM
(Can anyone help… I’ve tried various formations to no avail. I desperately need this for this weekend.)

arnelgp
09-04-2022, 05:56 PM
maybe try this formula:

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

branston
09-05-2022, 12:33 AM
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.

georgiboy
09-05-2022, 12:47 AM
=IF(HLOOKUP(B2+3,$F$2:$L$3,2,TRUE)<>C2,"YES","")

Aussiebear
09-05-2022, 04:46 AM
Whoa.... Georgiboy. that a good response .

branston
09-05-2022, 04:55 AM
Thanks georgiboy - that's awesome!

snb
09-06-2022, 03:49 AM
=INDEX($F$2:$L$2;MATCH($B2;$F$2:$L$2;1)+1)-4<$B2