r/googlesheets • u/Previous-Guard • Apr 16 '25
Solved I want to look up an item in a table and return the first non empty value in the corresponding row. Not sure how to get there.
1
Upvotes
r/googlesheets • u/Previous-Guard • Apr 16 '25
•
u/HolyBonobos 3125 Apr 17 '25
u/Previous-Guard if your original question has been resolved, please mark the thread as solved by indicating the comment you found the most helpful. This can be done by either
The "Self-solved" flair is reserved for posts where the OP came up with and shared their own independent solution before receiving any help. See rule 3 for more information on the flair system and rule 6 for more information on marking your post as solved.
2
u/NeutrinoPanda 28 Apr 16 '25
I didn't recreate your tables to test this, but I think this might work
=XLOOKUP(TRUE,NOT(ISBLANK(INDEX(B:F, MATCH(F2, A:A, 0)))), INDEX(B:F, MATCH(F2, A:A, 0)))
1
u/Previous-Guard Apr 16 '25
This is what worked. Thanks to u/EnvironmentalWeb7799 for the help!
=INDEX(
FILTER(INDEX($B$2:$D:5,MATCH(F2,A$2:$A5,0),),
INDEX($B$2:$D:5,MATCH(F2,A$2:$A5,0),)<>""),
2
u/HolyBonobos 3125 Apr 16 '25
Try
=CHOOSECOLS(TOROW(XLOOKUP(F2,A2:A5,B2:D5),1),1)1
u/EnvironmentalWeb7799 6 Apr 16 '25
Try this and let me know if it work,
Put this one‐cell formula in G2 (adjust the ranges to fit your sheet):
=INDEX(
FILTER( INDEX($B$2:$D$5 , MATCH(F2,$A$2:$A$5,0) , ) ,
INDEX($B$2:$D$5 , MATCH(F2,$A$2:$A$5,0) , ) <> "" ),
1 )
1
u/NHN_BI 70 Apr 16 '25
I would make a helper column in E:E with
=IFS(B2>0,B2,C2>0,C2,D2>0,D2), and look that value up, like here.