问题
I'm looking for a formula which can do the following:
Lookup a value in column E:I and return all the values from column B:D from the rows it is present.
Example: Looking for S190202
, it would return B:D from row 2,5,6
回答1:
=QUERY(A1:I, "select B,C,D where E='S190202'
or F='S190202'
or G='S190202'
or H='S190202'
or I='S190202'", 1)
for a cell reference, you can change it to:
=QUERY(A1:I, "select B,C,D where E matches '"&K2&"'
or F matches '"&K2&"'
or G matches '"&K2&"'
or H matches '"&K2&"'
or I matches '"&K2&"'", 1)
where K2 contains value S190202
来源:https://stackoverflow.com/questions/55119257/google-sheets-search-value-and-return-certain-columns-of-multiple-rows-where-the