VBA: How to delete paragraph marker

NeoSez

Board Regular
Joined
Aug 14, 2020
Messages
210
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
There is a date dd/mm/yyyy and then a new paragraph after it. I tried to remove it many ways and was unsuccessful. Can someone provide a VBA code to remove the space or new paragraph, under that one column? The date should have no spaces before or after. Thank you.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Maybe this, which will remove para s and spaces
Select the range of cells then run the code
VBA Code:
Sub MM1()
    Dim xChars As String
    Dim I As Long, cell As Range
    xChars = "¶ "
    For Each cell In Selection
    For I = 1 To Len(xChars)
        cell = Replace(cell, Mid(xChars, I, 1), "")
    Next I
    Next cell
End Sub
 
Upvote 0
Do you realise you can do this without the code.....
Highlight the column>>EditingTab>>Find>>Replace>> In the find box, Hold down the ALT key and, using the numberpad, type 0182 Leave the replace box blank>> OK
 
Upvote 0

Forum statistics

Threads
1,215,522
Messages
6,125,312
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top