Forum Discussion
Tubolard
Jan 15, 2024Copper Contributor
Return header of Min value from a range, where first cell in row matches search key.
Hello I need help putting together a formula that solves the following for me. I would like to reference "Sample Sheet 1" using a search key from "Sample Sheet 2" to attach the header of each col...
Patrick2788
Jan 15, 2024Silver Contributor
This formula doesn't assume the states are in the same order in both sheets.
365 solution
=LET(
GetColors, LAMBDA(row,
LET(lowest, MIN(row), headings, FILTER(colors, row = lowest), TEXTJOIN(", ", , headings))
),
Results, BYROW(values, GetColors),
XLOOKUP(each_state, states, Results)
)