![]() ![]() Then all commas in selected cells are replaced with newlines immediately. Press the F5 key or click the Run button to run the code. RngCell.Value = Replace(rngCell, ",", vbLf)ģ. VBA code: Replace all commas in selected cells with newlines Sub ReplaceComma() Then copy and paste VBA code into the Code window. In the Microsoft Visual Basic for Applications window, click Insert > Module. Select the cells containing the commas you need to replace with newlines, then press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.Ģ. This section will introduce a VBA code to replace all commas in selected cells with newlines. Replace commas with newlines with VBA code Now all commas are replaced with newlines in selected cells. Then a Microsoft Excel prompt box pops up, please click the OK button.Ĥ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |