简体   繁体   中英

Google Sheets Arrayformula with some sort of concatenate/textjoin/something similar for all rows

I'm trying to do an arrayformula that goes down all rows. I want it to grab the text from a specific row if the row that it's on meets conditions.

Here's an example of what I'm trying to do: have a formula in G5 that iterates through A:F. If the cell = "N", the grab the text from row 4 and concatenate it into a single string, with the text separated by commas.

在此处输入图像描述

I've looked at other questions on stack overflow but they're not quite the same.

Here's a sample Sheet I've gotten as far as the formulas in K4 and P4, but can't figure out how to make it all one formula.

Any suggestions on how to do this?

use:

=ARRAYFORMULA(REGEXREPLACE(TRIM(FLATTEN(QUERY(TRANSPOSE(
 IF(A5:F="N", A4:F4&",", )),,9^9))), ",$", ))

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM