Find the first cell value meeting the specified condition
In the table below, the 1st column is subject and columns after it are test scores arranged in order.
A |
B |
C |
D |
E |
|
1 |
Art |
0 |
3.67 |
6.2 |
7.8 |
2 |
History |
3.78 |
6.21 |
7.2 |
9.8 |
3 |
Maths |
5.6 |
6.3 |
6.6 |
8.9 |
Task: Specify a subject and a score and, according to the specified values, find the first cell value that is equivalent to or greater than the score under the subject. For example, when the parameters are Maths and 6.5, the expected return result is 6.6.
Use SPL XLL to do this:
=spl("=?1.select@1(~1==?2).m(2:).select@1(~>=?3)",A1:E3,"Maths",6.5)
select@1 function find the first eligible member that meets the condition. m(2:) gets members from the 2nd to the last. ~1 is the 1st member and ~ represents the current member.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/