No one looks there

Status
Not open for further replies.
L

Legacy 5596

Guest
I posted this in the appropriate non-Excel section of the forum but it seems no one looks there, as I typically would get an immediate response. So, please forgive me for posting it here. I know there is someone over here that has knowledge in both Excel & Word macros that can help.

I would like a simple macro that inserts a superscript sequential number at the beginning of each new sentence of an established body of text (ignoring blank lines obviously). The text size for the number should be 6-8 point so as not to mess up the formatting of the established text (I don't want the inserted number to push the text at the end to the next line).

I realize MSWord has a line numbering feature but it is not useful for what I'm trying to do because it doesn't copy & paste the line numbers to other documents & it is line numbers as opposed to sentence numbers.

Example:
1The dog ran after the cat and the cat jumped through the window to escape. 2The dog barked furiously but could not follow the cat through the small window. 3 The cat was happy to be safe.

Obviously the macro would have to look at characters & consider the end of a sentence to be a period, a colon, a semi-colon, a question mark, & an exclamation mark & the new number would be inserted right before the next character.

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Status
Not open for further replies.

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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