sunhux
asked on
Excel/Word 2003 macros to replace variable text strings with null/space
www.aa.com.crt_12345_1.txt
www.bb.com.crt_678_2.txt
www.cc.com.crt_99_3.txt
.....
I would like to put all the above hundreds of lines in Word/Excel &
remove everything from .crt_XXX_Y.
So the resulting output should be:
www.aa.com.txt
www.bb.com.txt
www.cc.com.txt
I'm not too good with Excel/Word, so pls give a very layman's step by step instructions.
I've read about creation subFunction etc but don't even know how to invoke them
www.bb.com.crt_678_2.txt
www.cc.com.crt_99_3.txt
.....
I would like to put all the above hundreds of lines in Word/Excel &
remove everything from .crt_XXX_Y.
So the resulting output should be:
www.aa.com.txt
www.bb.com.txt
www.cc.com.txt
I'm not too good with Excel/Word, so pls give a very layman's step by step instructions.
I've read about creation subFunction etc but don't even know how to invoke them
ASKER
In the days I was administering OpenVMS, there's a TPU editor which I
could define macros to search for the string ".com.", start the "select",
then search for the ".txt" string, then invoke the "cut" function & record
these repeated keys in a macro by say pressing F12 to represent the series
of keys being pressed.
Then I would create another TPU macro which will record say pressing ten
times of F12 & record it to another key, say F11 & just by pressing F11,
I could do ten replacements such strings
could define macros to search for the string ".com.", start the "select",
then search for the ".txt" string, then invoke the "cut" function & record
these repeated keys in a macro by say pressing F12 to represent the series
of keys being pressed.
Then I would create another TPU macro which will record say pressing ten
times of F12 & record it to another key, say F11 & just by pressing F11,
I could do ten replacements such strings
Leave the programing for us will arrange that simply post the files properly as stated above.
gowlfow
gowlfow
ASKER
Those are not links that I've posted but only strings of plain text.
I'll also need to amend the text below to :
www.aa.com.crt_12345_1
www.bb.com.crt_678_2
www.cc.com.crt_99_3
. . .
www.aa.com.crt_12345_1
www.bb.com.crt_678_2
www.cc.com.crt_99_33
So will another macro that searches for ".crt", start "Select", then press the "End"
key to go end of the line, then press "Cut" or "Del" key
I'll also need to amend the text below to :
www.aa.com.crt_12345_1
www.bb.com.crt_678_2
www.cc.com.crt_99_3
. . .
www.aa.com.crt_12345_1
www.bb.com.crt_678_2
www.cc.com.crt_99_33
So will another macro that searches for ".crt", start "Select", then press the "End"
key to go end of the line, then press "Cut" or "Del" key
ASKER
Just treat those underlined links as plain text: somehow EE translates
them to links but I was just entering plain text
them to links but I was just entering plain text
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
In Excel 2003, there's no "More>> button and tick the 'Use Wildcards' checkbox"
but there is "Options" button which does not show any 'Use WIldcards'.
What Saqib gave works. Just curious, if we were to treat * as a character (not as
a wildcard) ie if we want to replace * with say null, how do we go about replacing?
Not that I have this need but curious
but there is "Options" button which does not show any 'Use WIldcards'.
What Saqib gave works. Just curious, if we were to treat * as a character (not as
a wildcard) ie if we want to replace * with say null, how do we go about replacing?
Not that I have this need but curious
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
One last question:
if I'm replacing <tab> character with a space character, how does this go?
if I'm replacing <tab> character with a space character, how does this go?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In Word Find, the tab character is ^t
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
gowflow