I have raw data in columns A:E, I want to bring it over to columns H2:K dynamically based on whatever values are f2 and g2. If f2 = column D name then bring over the data for that row highlighted in columns H:K
If I were to do this in excel, I’d do:
=let(
_lastrow,match(2/1(A:A<>""),
_Product,A2:INDEX(A:A,),_lastrow),
_Comments,B2:INDEX(B:B),_lastrow),
_Criteria1,D2:INDEX(D:D),_lastrow),
_Criteria2,E2:INDEX(E:E),_lastrow),
_Hstack,CHOOSE({1,2,3,4},_Product,_Comments,_Criteria1,_Criteria2),
FILTER(_Hstack,(_Criteria1=F2)*(_Criteria2=G2)))
but it’s not working in google sheets. I know function syntax is a little different, but has anyone figured this out?
Link to sheet: https://docs.google.com/spreadsheets/d/1yCF6RfXRBzYUKbs_ZVQzHSUCKmNIuDQtjfA1wlNrTdw/edit#gid=406909544
>Solution :
You can use the FILTER function
=FILTER({A:A,C:E},D:D=F2,E:E=G2)

