Forum Discussion

g-00000's avatar
g-00000
Copper Contributor
Mar 12, 2024

How to replace without destroying formatting and in-cell-linebreak?

I want what in the red circle.

Using replace in excel destroys formating.

Using replace in word doesn't destroy formating, but pasting back to excel destroys linebreaks in one cell (alt+enter), making each line be in a single cell, even if these linebreaks are manual linebreaks (^l) instead of paragragh marks (^p).

 

HOW TO DESTROY NOTHING?

19 Replies

    • g-00000's avatar
      g-00000
      Copper Contributor

      PeterBartholomew1 

      Yes, real text is:

       

      n.意外发现珍奇事物的能力 luck, or good fortune, in finding something good accidentally
      例:result of serendipity 机缘巧合的结果
      近:
      派:

       

      (Only four lines)

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Copper Contributor
    =textjoin(char(10),,let(a,textsplit(j1,char(10)),if(right(a)=":","",a)))
    • g-00000's avatar
      g-00000
      Copper Contributor

      This destroys both formatting and linebreak.

      • peiyezhu's avatar
        peiyezhu
        Bronze Contributor

        Have you tested the formula?
        I recommend you upload a test file.
        As far as I know the formular provided by wdx223_Daniel keep line break at least.
        Other format, i.g. bold font or blue color font may disappear.

        If you want precise the format,I guess you need parse and formatting .

  • mathetes's avatar
    mathetes
    Silver Contributor
    This doesn't look like an appropriate use of Excel in the first place; why aren't you just doing the task (whatever it is) in Word? Is there something off screen that mandates Excel?
    • g-00000's avatar
      g-00000
      Copper Contributor

      Yes, want to memorize vocabulary using excel, for its function suits this purpose better than other softwares.

      • mathetes's avatar
        mathetes
        Silver Contributor
        Which "Excel function" suits the purpose of helping memorize vocabulary?
        You've already said that Word works better in the Find and Replace function. Word also has its own Tables--i.e., rows and columns--for organizing data systematically. So what else is unique to Excel that you're referring to?

Resources