Google Sheets QUERY Function: Select Columns by Name
you can transpose it and header row becomes a column. then: =TRANSPOSE(QUERY(TRANSPOSE(A1:C), “where Col1 matches ‘bb header|student'”, )) where A1:C is your named range (including header row) update: =QUERY({AI1:AK6}, “select Col2,Col3 where Col1=’Jones'”, 1) dynamically: =LAMBDA(p, t, s, QUERY({AI1:AK6}, “select Col”&t&”,Col”&s&” where Col”&p&”=’Jones’ order by Col”&t&” desc”, 1)) (MATCH(“principal”, AI1:AK1, ), MATCH(“teacher”, AI1:AK1, ), MATCH(“student”, … Read more