#1
|
|||
|
|||
Formatting
This is a random question but I thought i asked anyway. I need to organize data in a specified form before I can feed it into an external program to pull information from a database.
Here is the desired format. ('1234','1234','1234'.... etc). I am importing numerous Data from excel into word in a tabulated form and cant type each and every text in the format above. 1234 1234 1234 1234 Is there a way to convert the tabulated data format into the desired form above? Thanks. |
#2
|
||||
|
||||
Hi cegbuna,
For the data you've indicated, a wildcard Find/Replace should do the job, with: Find = (')([0-9A-Za-z]{1,})([',]{1,2}) Replace = \2^p The above will find any alphanumeric string preceded by a single quote and succeeded by a single quote and/or a comma, and delete everything except the alphanumeric string, which it then succeeds with a paragraph break. No vba required.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
How and where do I enter that code?
I am trying to convert the tabulated data into the ('****','****',...etc) format. Thanks |
#4
|
||||
|
||||
Well, since it's for a Find/Replace, you should enter it into Word's Find/Replace dialogue box ... (and do remember to choose the wildcards option)
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
I tried the code and it didn't work.
Thanks for the response. |
#6
|
||||
|
||||
Hi cegbuna,
Apologies - the Find/Replace expression I posted is for the reverse of what you're after. Try the following wildcard Find/Replace: Find = ([!^13]{1,})^13 Replace = ^39\1^39, After running this, you'll have an extra comma at the end of the data, which you can delete manually.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
It worked! Thank you.
|
#8
|
||||
|
||||
You're welcome - and now you have the Find/Replace code for going in either direction!
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formatting macro | Ulodesk | Word Tables | 9 | 04-10-2012 06:37 PM |
Automatic Formatting for whole row | Bacchanal Promotions | Excel | 2 | 03-19-2011 05:12 AM |
I want to remove formatting | Rose | Word | 2 | 05-30-2010 04:12 AM |
numbering and formatting | whitemelly | Word | 0 | 02-11-2010 09:06 AM |
Formatting Help | caution5697 | Word | 3 | 04-22-2009 11:53 PM |