'Get the last value of a column when another has a specific value
In this great community I always like to learn with what I am discovering, that is why I would like to know if this solution that I have found can be done in a better way.
I have two columns where I am introducing values and I get a value from a column according to the condition of the first one.
I do this with the following google sheets formula:
=INDEX(filter(Blockchains!F$2:F,Blockchains!E$2:E=VALUEA),ROWS(filter(Blockchains!F$2:F,Blockchains!E$2:E=VALUEA)),1)
Is there a way to make it better?
Solution 1:[1]
try:
=INDEX(QUERY(SORT(E:F, ROW(E:E), ), "where Col2 = 'VALUEA'", ), 1, 1)
better safe than sorry:
=INDEX(QUERY(SORT(E:F, ROW(E:E), )&"", "where Col2 = 'VALUEA'", ), 1, 1)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | player0 |


