#32 — Find The First Cell Value Meeting The Specified Condition

Problem description & analysis:

In the table below, the 1st column is subject and columns after it are test scores arranged in order.

Task: Specify a subject and a score and, according to the specified values, find the first cell value that is …


This content originally appeared on DEV Community and was authored by Judith-Excel-Sharing

Problem description & analysis:

In the table below, the 1st column is subject and columns after it are test scores arranged in order.

original table

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.

Solution:

Use SPL XLL to do this:

=spl("=?1.select@1(~1==?2).m(2:).select@1(~>=?3)",A1:E3,"Maths",6.5)

As shown in the picture below:

result table with code entered
Explanation:

select@1 function find the first eligible member that meets the condition. m(2:) gets members from the 2ndto the last. ~1 is the 1st member and ~ represents the current member.


This content originally appeared on DEV Community and was authored by Judith-Excel-Sharing


Print Share Comment Cite Upload Translate Updates
APA

Judith-Excel-Sharing | Sciencx (2024-07-24T04:03:23+00:00) #32 — Find The First Cell Value Meeting The Specified Condition. Retrieved from https://www.scien.cx/2024/07/24/32-find-the-first-cell-value-meeting-the-specified-condition/

MLA
" » #32 — Find The First Cell Value Meeting The Specified Condition." Judith-Excel-Sharing | Sciencx - Wednesday July 24, 2024, https://www.scien.cx/2024/07/24/32-find-the-first-cell-value-meeting-the-specified-condition/
HARVARD
Judith-Excel-Sharing | Sciencx Wednesday July 24, 2024 » #32 — Find The First Cell Value Meeting The Specified Condition., viewed ,<https://www.scien.cx/2024/07/24/32-find-the-first-cell-value-meeting-the-specified-condition/>
VANCOUVER
Judith-Excel-Sharing | Sciencx - » #32 — Find The First Cell Value Meeting The Specified Condition. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/24/32-find-the-first-cell-value-meeting-the-specified-condition/
CHICAGO
" » #32 — Find The First Cell Value Meeting The Specified Condition." Judith-Excel-Sharing | Sciencx - Accessed . https://www.scien.cx/2024/07/24/32-find-the-first-cell-value-meeting-the-specified-condition/
IEEE
" » #32 — Find The First Cell Value Meeting The Specified Condition." Judith-Excel-Sharing | Sciencx [Online]. Available: https://www.scien.cx/2024/07/24/32-find-the-first-cell-value-meeting-the-specified-condition/. [Accessed: ]
rf:citation
» #32 — Find The First Cell Value Meeting The Specified Condition | Judith-Excel-Sharing | Sciencx | https://www.scien.cx/2024/07/24/32-find-the-first-cell-value-meeting-the-specified-condition/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.