Note: The other languages of the website are Google-translated. Back to English

Sut i ddisodli alt-enter gyda gofod / coma yn Excel?

Er enghraifft, mae rhai celloedd â dychweliadau cerbyd fel y dangosir isod y screenshot. Nawr eich bod am ddisodli'r cymeriadau alt-enter hyn gyda gofod neu atalnod yn Excel, sut allech chi ddelio ag ef? A dweud y gwir, y ddau Dod o hyd ac yn ei le gall nodwedd a VBA eich helpu i ddatrys y broblem.

Amnewid alt-enter gyda gofod / coma yn ôl nodwedd Dod o Hyd ac Amnewid

Gallwch chi ddisodli cymeriadau all-enter yn hawdd gyda gofod neu goma gan y Dod o hyd ac yn ei le nodwedd yn Excel. Gwnewch fel a ganlyn:
1. Dewiswch y celloedd y byddwch chi'n disodli'r nodau alt-enter, ac yn pwyso Ctrl + H allweddi i agor y blwch deialog Dod o Hyd ac Amnewid.

2. Yn y blwch deialog Dod o Hyd ac Amnewid, o dan y Disodli tab, os gwelwch yn dda:
(1) Yn y Dod o hyd i beth gwasg blwch Ctrl + J allweddi i fynd i mewn i gymeriad alt-enter;
(2) Yn y Amnewid gyda gofod math blwch neu atalnod yn ôl yr angen;
(3) Cliciwch y Amnewid All botwm. Gweler y screenshot:

3. Cliciwch y OK botwm yn y blwch deialog popio allan Microsoft Excel. Ac yna cau'r blwch deialog Dod o Hyd ac Amnewid.

Nawr fe welwch fod eich cymeriad penodedig yn disodli pob nod alt-enter, fel coma. Gweler y screenshot:

Cyfunwch resi / colofnau i mewn i un gell a'u gwahanu gyda gofod, coma, llinell newydd, ac ati.

Kutools ar gyfer Excel's Cyfuno Colofnau neu Rhesi gall cyfleustodau helpu defnyddwyr Excel i gyfuno colofnau neu resi lluosog yn un colofnau / rhes yn hawdd heb golli data. Yn ogystal, gall defnyddwyr Excel lapio'r tannau testun cyfun hyn gyda cherbyd neu ddychweliad caled, coma, gofod, hanner colon, ac ati. Nodwedd Llawn Am Ddim Treial 30-diwrnod!
ad cyfuno colofnau rhesi llinell newydd

Amnewid alt-enter gyda gofod / coma gan VBA

Os ydych chi'n gyfarwydd â VBA, gallwch hefyd ddisodli'r cymeriadau alt-enter gyda gofod, coma, neu unrhyw gymeriad arall yn ôl yr angen gyda VBA yn Excel.

1. Gwasgwch Alt + F11 allweddi i agor ffenestr Microsoft Visual Basic for Applications.

2. Cliciwch Mewnosod > Modiwlau, ac yna pastiwch islaw cod VBA i mewn i ffenestr y modiwl newydd.

VBA: Amnewid alt-enter gyda gofod / coma yn Excel

Sub ReplaceLineBreak()
Dim xRg As Range
On Error Resume Next
Set xRg = Application.InputBox("Select Cells:", "KuTools for Excel", Selection.Address, , , , , 8)
If xRg Is Nothing Then Exit Sub
xRg.WrapText = False
xRg.Replace Chr(10), "Your text here", xlPart, xlByColumns
End Sub

Note: Before running the VBA, please find the code xRg.Replace Chr(10), "Your text here", xlPart, xlByColumns, and replace Your text here with space, comma, or other character as you need.

3. Press F5 key or click the Run button to run this VBA.

4. In the popping out KuTools for Excel dialog box, please select the cells you will replace the alt-enter characters, and click the OK button. See screenshot:

Now you will see all alt-enter characters are replaced with you specified character, such as comma. See screenshot:

Related articles:

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations