I'd like to write a formula to such that it returns a range of cells from column H (unique ID) based on a criterion that is the value in column G (parent manual id). So for eg the formula should return a range of all the cells highlighted in yellow (from the image below) when the criteria in the adjacent column (column G) is 1. Similarly, the formula should return a range of all the cells highlighted in blue when the criterion (column G) is 2, and so on.
The reason, I need this to be a range of cells, is because I need to pass this resultant range as an argument into another formula (a TEXTJOIN function).
use FILTER
=FILTER(H:H; G:G=1)
and:
=FILTER(H:H; G:G=2)
and then do your TEXTJOIN
for csv:
=TEXTJOIN(", "; 1; FILTER(H:H; G:G=1))
or perhaps for regex:
=TEXTJOIN("|"; 1; FILTER(H:H; G:G=2))
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.