Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Splitting a list contained within a single cell and want to associate/add text from a different cell in the same row to the new separated list

$
0
0

I am using Google Forms to collect information. In google sheet, I have rows of data and one of the cells contains lists that needs to be separated out.

=query(FLATTEN(ArrayFormula(IFERROR(SPLIT(G2:G,char(10))))),"where Col1 is not null",0)

This Formula Works to Split Multiple entries from a single cell(G2:G) into a list

I would like to have the "Title"(B2:B) of the responses collected to be combined with the entries that were split form the "List"(G2:G)

=query(FLATTEN(ArrayFormula(IFERROR(SPLIT(G2:G,char(10))&B2:B))),"where Col1 is not null",0)

This does split the List in the cells, but adds the title directly to the last character of the list item. Also, it adds more rows of just the "Title"(b2:b)

=query(FLATTEN(ArrayFormula(IFERROR(SPLIT(G2:G,char(10))&" - "&B2:B))),"where Col1 is not null",0)

This Gives me error message: Result was not automatically expanded, please insert more rows (454494).

I also tried to use the working SPLIT Formula(Q2:Q) from above, and used index and match with it/

=ArrayFormula(iferror(index($B$2:$B, Match("*"&Q2:Q&"*",$G$2:$G,0),1)&" - "&Q2:Q ,""))

This returned the "Title" in B2 combined with all the split entries. If Failed to recognize the other "Title"

=arrayformula(if(Q2:Q="","",Match("*"&Q2:Q&"*",$G$2:$G,0)))

I split out the match formula and it does return the proper row # of the "Title" where the SPLIT List Entries came from.

Here is a sample Google Sheethttps://docs.google.com/spreadsheets/d/10gSSB4RE8049OlTh-FagxrZ2Bg0Mt7o0n4OE-gr-0IM/edit?usp=sharing

The outcome I am Looking for is to have the "Title"B2:B combined in the entries of that were SPLIT from "List" G2:G


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>