Remove Text Wrap Using Macros:
In this article, we are going to explore how to Remove Text Wrap Using Macros in Excel Office 365 with an example. Get an official version of MS Excel from the following link: https://www.microsoft.com/en-in/microsoft-365/excel
Remove Text Wrap Using Macros:
To remove text wrap using Macros in the Excel spreadsheet, do as follows.
- On the Developer Tab, select the Visual Basic option under the Code section.
- You have to activate the sheet where you want to remove text wrap in Excel.
- Now, enter the below code.
VBA code for removing text wrap in Excel
Sub RemoveWrapAndAutofitCells()
Activate
Cells.Select
‘Remove the Text Wrap
Selection.WrapText = False
‘Autofit all of the cells afterwards
Cells.EntireRow.AutoFit
Cells.EntireColumn.AutoFit
End Sub
- You need to save the code by selecting it. Then close the window.
- You have to open the sheet containing the data. On the Developer Tab, choose the Macros option in the Code section.
- You have to make sure that your macro is selected and click the Run button.
Before applying the VBA & Macros Code:
After running the VBA & Macros Code:
- Now, you can get the output as shown in the below image.
Verdict:
In the above article, you can learn the steps to Remove Text Wrap Using Macros in Excel Office 365 with an example. Leave your feedback in the comment section. Thanks for visiting Geek Excel. Keep Learning!!
Top comments (0)