Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-19-2018, 11:08 PM
Robert Kay Robert Kay is offline Code to find numerical string + space throughout document  & replace them with Comma Windows 10 Code to find numerical string + space throughout document  & replace them with Comma Office 2016
Novice
Code to find numerical string + space throughout document  & replace them with Comma
 
Join Date: Feb 2018
Location: Australia
Posts: 4
Robert Kay is on a distinguished road
Default Code to find Numerical string etc

Thanks for your reply Paul. I am afraid your code doesn't work. As I understand it:
The "find" expression translates ^13 is code for the paragraph break - I don't understand the expression or function ^| - or is that a lower case L?.
I assume the [0-9]{1,} is to find a numerical string between zero and nine. What is the function of the numeral one in curly brackets? I gather the expression ^32 represents a space.
My understanding of the "replace" function is that it replaces the first element in the find expression (i.e. the \1) with a space. I don't want a space, I need a comma after the number represented by the numerical string. The numerical string can be any number (i.e. set of numerals comprising a number, between 1 and 99999. The numbers above 1000 are not comma delineated.

The following text is an example of the original document:

641 Beard, Ernest Noel, 31 Tennyson st., S.8, analyst, M
642 Beard, Suzanne Louise, 31 Tennyson st., S.8, sales; F
643 Beasley, Howitt, 72 Beaumaris pde., S.21, foreman, M
644 Beasley, Joyce Ivy, 18 Victory st., S.8, mechanic, F
645 Beaton, Flora Janet, 44 Sims st., S.8, home duties, F

I want the result of the macro to produce

641,Beard, Ernest Noel, 31 Tennyson st., S.8,,analyst, M
642,Beard, Suzanne Louise, 31 Tennyson st., S.8, sales; F
643,Beasley, Howitt, 72 Beaumaris pde., S.21, foreman, M
644,Beasley, Joyce Ivy, 18 Victory st., S.8, mechanic, F
645,Beaton, Flora Janet, 44 Sims st., S.8, home duties, F

Your advice would be appreciated
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to find numerical string + space throughout document  & replace them with Comma Find & Replace text in Field Code across multiple documents RPM7 Word VBA 6 05-12-2017 12:58 AM
Code to find numerical string + space throughout document  & replace them with Comma Find and Replace with space cheech1981 Word 3 03-29-2017 02:33 PM
How to do multiple find and replace in string. PRA007 Word VBA 2 01-06-2016 09:10 PM
Code to find numerical string + space throughout document  & replace them with Comma Find and replace a string of text errtu Word 1 01-31-2013 02:09 PM
Code to find numerical string + space throughout document  & replace them with Comma Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft