Tech Support Guy banner
Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
1 Posts
Discussion Starter · #1 ·
Dear experts,

I am struggling with an Excel macro or formula, that must be able to handle the following tasks:
Concatenate the values in Sheet1, from Colum T, Row 11 to Row 15
Then give the output in Sheet2, in a merged cell (H22).
Then organize the input in the merged cell so the output is appearing as separate lines.

This I have solved by the following formula:
=CONCATENATE(Summary!T11,CHAR(10),Summary!T12,CHAR(10),Summary!T13,CHAR(10),Summary!T14,CHAR(10),Summary!T15,CHAR(10))

Unfortunately I am getting duplicates in the output cell, which I don't want, and I don't want to use the Remove duplicates function in Sheet1, as the raw data must remain.

I will highly appreciate if anybody can propose a Macro or formula that can solve the issue.
 

·
Super Moderator
Joined
·
74,177 Posts
Hi, and welcome to TSG.

One way to prevent duplicates using a formula might be to use the COUNTIF() function to determine if the content of the current cell being considered for concatenation is repeated in any of the cells above it. That would then go inside of an IF() function to concatenate a line break and cell content if the count is zero or skip the line break and cell content if the count is greater than zero.
 

·
Trusted Advisor
Joined
·
6,911 Posts
Hi, welcome to the forum.
It would help if you included the Office version and a non-private data sample file.
Makes it easier to see what you run into than just giving an answer based on assumptions.
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top