Automating repetitive tasks-creating text strings from excel into

G

Guest

Every day, I create a list of unique numbers from excel, then copy and paste
into word using paste special- unformatted text since I do not want the cells
to be included. I take this column of unigue numbers and manually go into it,
placing a comma at the end of the text, then use delete to get the text in to
single row with commas seperating the unigue number. For example, I start
with rows that look like this:
1234
2345
3456
4567
and turn it into this:
1234,2345,3456,4567

I need the text string to look like this so I can copy and paste it into a
database to search for these numbers. Is there any other way to paste this
information from excel into word so I can do away with all these repetitve
keystrokes, or can someone help me "loop" the keystrokes in a macro so I can
easily get the text strings I need? On occasion, the list when copied into
word will be 10+ pages, a huge time waster, but still easier than keystoking
each unique number into the database to search. I am using word and excel
2002 accoring to the "about" tab in the software.

Thank You,
Jacky D.
 
H

Herb Tyson [MVP]

If I'm understanding you correctly, you end up with a series of numbers on
separate lines in Word. This series could be many pages of numbers--not just
the four shown in your example.

You should be able to convert the list of numbers into a single row of
numbers quite easily using find/replace. Press Ctrl+H:

Find what:^p (special symbol for paragraph mark)

Replace with:,

Replace All.

You would need to remove the final comma at the end of the last number, or
just not select it when you copy to the clipboard for pasting into the
database search box.

You can even turn Paste Special Unformatted into a single keystroke, if you
like. Details here:

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=128
 
G

Guest

Herb,
When I inserted the paragragh symbol, word responded that ^p was not a
valid special character in the find what box. I tried go to the menu bar and
using the insert special character, but the paragrapgh symbol that looks more
like a music note would not insert into the find box.

And yes, you are understanding that I end up with pages of rows of numbers
that need to be placed into a single test string with a comma in between each
unigue number.

Thanks again,

Jacky D.
 
G

Guest

Never mind the last post, I saw where the button was to insert the special
paragragh mark iunder more in teh find/replace box, sorry for my
misunderstanding, and thanks again, this is goign to help me out trendously!

jacky D.
 
S

Suzanne S. Barnhill

The only reason you would get this message for ^p is that you have "Use
wildcards" checked. When using wildcards, you have to use ^13 instead.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top