1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Support Excel Macro to hide Concatenated cell & line break

Discussion in 'Business Applications' started by MHELTech, Nov 13, 2018.

Thread Status:
Not open for further replies.
  1. MHELTech

    MHELTech Thread Starter

    Joined:
    Nov 12, 2018
    Messages:
    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.
     
  2. cwwozniak

    cwwozniak Trusted Advisor Spam Fighter

    Joined:
    Nov 28, 2005
    Messages:
    63,039
    First Name:
    Chuck
    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.
     
  3. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,597
    First Name:
    Hans
    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.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1219066

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice