Forum Discussion

Happywithlife's avatar
Happywithlife
Copper Contributor
Apr 22, 2024
Solved

Retain text formatting when using Concat or Textjoin

Is it possible to retain text format when concatenating cells?  In this example, I would like to combine cells a2, b2, and c2 retaining the italics formatting on a2.  Thanks for your help.

 

  • Happywithlife 

    No, it is not possible to format part of the result of a formula differently from the rest.

     

    A possible workaround is to use VBA to populate E2 with a value instead of a formula and to apply the desired formatting. But it would be complicated to get this right in all possible situations.

3 Replies

  • peiyezhu's avatar
    peiyezhu
    Bronze Contributor

    Happywithlife 

    create html by sql:

    select *,Customer||'<i>'||Revenue||'</i>' from Sheet1 

     

    then copy to excel.

     

     

     

  • Happywithlife 

    No, it is not possible to format part of the result of a formula differently from the rest.

     

    A possible workaround is to use VBA to populate E2 with a value instead of a formula and to apply the desired formatting. But it would be complicated to get this right in all possible situations.

Resources