LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
DEE DEE is offline
external usenet poster
 
Posts: 250
Default Macro to edit text string data input

I am attempting to write a macro that will edit subsequent rows of data (text
strings always in the same format for each row) which I paste in from
another source one group at a time, and place the portions I wish to retain
elsewhere in my spreadsheet in the form of a mailing list. In other words, I
want to: #1 copy text string data from another source (which is always laid
out in the same format for each record); #2 paste the data into my
spreadsheet; #3 run a macro which pulls out only those portions I need to
retain and places those portions elsewhere in my spreadsheet one record after
another; and #4: start the process over with the next group of data pasted in
on top of the first group.

I have two problems: 1) While I have written a macro that successfully
edits the first group of pasted data text strings, when I pull in a
subsequent set of data strings and paste them over the first set of data and
then run the macro, the results returned are always those results obtained
from the very first set of data strings. 2) I am not clear on how best to
copy the parsed -out portions of each record to the mailing list portion of
my spreadsheet -- that is, I do not know how to append the mailing list
portion of my spreadsheet with each new parsed-out record.

What I am trying to avoid is having to pull every record in from my source
at one time and THEN run the macro to edit out the portions of each record I
wish to retain. I want to do it one record at a time--paste in one record
group, edit down and copy to elsewhere what I need to retain from the record
utilizing a macro, go back to my source, copy the next record group and paste
it into my spreadsheet over the first record group, run the editing and copy
macro(s), go back to the source for the next group, etc.

The source copy and subsequent pasting into Excel results in the data ending
up in cells A1, B1. C1, etc. with alot of extraneous text and spaces I don't
need. After the paste, it looks like this:

A1: John D Doe Company Title
B1: See descriptions... Other Titles
C1: See descriptions... CompanyABC Inc.
D1: Webpage Address123 Anystreet, Suite 2
E1: Anytown, USA 12345 Phone(123)456-7890 Ext. 0 Fax(123)456-7980

Can anyone help me please?

Thanks!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reset row hight after string of text edit on a cell Tony Excel Discussion (Misc queries) 0 February 3rd 09 03:21 AM
edit text string in column B useR Excel Discussion (Misc queries) 7 April 7th 06 10:10 PM
Macro to find text string in a column and paste data in another nicolascap Excel Discussion (Misc queries) 8 March 14th 06 03:13 PM
How to import a text file to Excel treating all input content are in string. Chittu Excel Discussion (Misc queries) 1 July 22nd 05 06:37 AM
insert data into macro code from text input field? john_t_h[_15_] Excel Programming 1 January 16th 04 03:14 AM


All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"