


Selection.WrapText = False 'Removing Wrap Text The Remove VBA is very simple… Sub RemoveLineBreak() The code itself is very simple and actually utilizes the Excels Find and Replace Tool. If you don’t like that, just comment out the second line of code. More or less this is done so you can easily see the effect of the code but it’s also there for practical reasons. And the other thing is, this code turns off the Wrap Text command. Remove or Replace Line Breaks (Alt+Enter) in Excel with VBAįirst of all, this code works with the Selection, so it will only execute on the selected cells. This gives you a blinking dot that represents a cursor that has dropped by one line and then if you leave the Replace with empty, you will remove the line breaks and if you put Space (or any character you want) in the Replace with box, all your line breaks will be replaced by spaces (or your selected character). The Remove and Replace part can be done with the Find and Replace tool, where the only trick you have to know, is to use the Ctrl+J or Alt+0010 (the 0010 has to be typed in the numeric part of the keyboard) combination in the Find Box. Firstly, let’s look at the Remove or Replace multiple Line Breaks at once. Meaning that there are multiple line breaks you want to insert or remove at once. But sometimes you need to insert or remove line breaks (Alt Enter) on a high level. It’s what you use when you want to have text show in multiple lines regardless the width of the column. Alt Enter is known as a manual line break in Excel.
