How to solve when the sublist does not have the same value?

how to solve without the code block turning yellow, and understand that the value contained in the range is equivalent to the value defined for this range?

@Tiago,
I’m not sure if I understood your question correctly.
See if this helps.