Space after period.

topi1

Active Member
Joined
Aug 6, 2014
Messages
252
Office Version
  1. 2010
Trying to find a vba which will add a space between sentences if none exists. To clean up texts, email etc. for a column or entire sheet.Tried to learn about patterns but could not figure out how to do that on my own. Dr. Google didn't help either. Thank you.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Howdy,
Would you not just run 2 find and replace macros? One which searches for a period "." and replaces it with a period followed by a space ". " Then your second find and replace would look for 2 consecutive spaces " " and replace with one " "?
 
Upvote 0
Solution
Howdy,
Would you not just run 2 find and replace macros? One which searches for a period "." and replaces it with a period followed by a space ". " Then your second find and replace would look for 2 consecutive spaces " " and replace with one " "?
Isn't it just replace "<non-space character><full stop><non-space character>" with "<full stop><space>"
 
Upvote 0
Isn't it just replace "<non-space character><full stop><non-space character>" with "<full stop><space>"
Or that. I'm not sure how do to it via VBA. With my current knowledge, I'd just get 2 macros and get the VBA to run them when needed.
 
Upvote 0
Howdy,
Would you not just run 2 find and replace macros? One which searches for a period "." and replaces it with a period followed by a space ". " Then your second find and replace would look for 2 consecutive spaces " " and replace with one " "?
But of course. Simple but brilliant! Can't believe I didn't think of it. That is what happens when you think help is round the corner. You get lazy! Thank you much. I also added the same thing for ! and ?.
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

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