No one looks there

Not open for further replies.

Legacy 5596

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.

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.


Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Not open for further replies.

Watch MrExcel Video

Forum statistics

Latest member