Forum Discussion
Combining Text Cells
Hello,
I have a spread sheet that has text in different cells. The cells are sorted by day of the week. I would like to combine all of the text cells into one cell on another sheet based on the day of the week. Similar to the SUMIF function for summing up numbers for a category. I can't seem to find a formula that does that.
I would like a formula that puts all the descriptions for Tuesday into one cell on another sheet. Repeat the process for the different days of the week. By date is fine too.
- Patrick2788Silver Contributor
Here's my approach:
=LET( filtered, FILTER(Table1[Description:], Table1[Day:] = B2, ""), linebreak, CHAR(10), TEXTJOIN(linebreak, , filtered) )
- not_ashumaCopper Contributor
Can you do your solution without a table? My data isnt in a table currently. When I put it into a table it messes up the format pretty badly.
- Patrick2788Silver Contributor
Yes, here's a version with no table that uses dynamic named items. The formula is a bit shorter:
=LET( filtered, FILTER(description, day = B2, ""), linebreak, CHAR(10), TEXTJOIN(linebreak, , filtered) )
You can use TEXTJOIN and FILTER:
=TEXTJOIN(" ". TRUE, FILTER(description_range, day_range="Tuesday", ""))