Forum Discussion
Ben Taylor
Jul 06, 2018Copper Contributor
Removing TEXTJOIN duplicates with multiple rows
Hi all, Attached is a spreadsheet designed to track the start dates of certain modules which happen in different terms, converting a table of this information into a calendar. The formula det...
- Jul 06, 2018
Ben,
you need simply counting:
=IF(COUNTIFS($A$5:$A$8,$E5,$C$5:$C$8,G$1),"A","")
SergeiBaklan
MVP
Hi Ben,
If I understood your logic correctly you'd like to have instead of text like "A A" just "A" and variants of your texts are empty one; single "A" or repeated "A" with spaces.
When you may use something like
=LEFT(TEXTJOIN(" ", TRUE, IF(<condition>, "A","")),1)
Ben Taylor
Jul 06, 2018Copper Contributor
Hi Sergei,
This is a really neat little solution which works - thank you!
I changed this formula:
{=TEXTJOIN(" ",TRUE, IF(MATCH($C$5:$C$8,$C$5:$C$8,0)=(ROW($C$5:$C$8)-ROW($C$5)+1), IF(($A$5$A$8=$E6)*($C$5:$C$8=K$1), "A", ""), ""))}
to this one:
{=LEFT(TEXTJOIN(" ",TRUE, IF(($A$5:$A$8=$E6)*($C$5:$C$8=K$1), "A", "")), 1)}
If I were to stop here, I would use this answer. I intend, however, to add another column of "B" dates which can overlap the "A" dates, so some cells would need to read "A B" (but not "A A B").
In any case, thanks very much for the swift response and nifty solution, Sergei!