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))), ",$", ))