LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Macro to Delete first words in a column

Hi

I'm working in 2002 and have a spreadsheet with several columns. One of
the columns has text consisting of a surname and several other names
after each entry. That is each field (or line) in that column contains
several words. I need to delete the first word (happens to be the
surname) in each field in that column. Because a dealing with several
thousand records, I would obviously like to create a macro to do this,
one line at a time. I attempted to create this macro with the "record a
macro" function. But it has not worked for me. The macro I produced
just pastes the same end result (from the first field) in every field I
run it.

Example:
Changing "Smith John Andrew" to "John Andrew"
Changing "Henderson Frank: to "Frank"
etc.

Basically, once I am in a field in that column, I want the macro to do
its thing, I would like it to:

F2 (to edit the field)
Home (to go to the beginning of the text words)
Shift-Ctrl-Right arrow (to select the first word)
Delete (to delete that selected first word)
Enter (to accept the result ad move to the next field below it).

I have been unsuccessful in creating that macro - or at least it does
not work correctly when recorded and just pastes the results of the
first field I created the macro in. Is it possible to create such a
macro? I do not know Visual basic and therefore cannot write it from
scratch, assuming it was possible to do so.

Can someone help? Any help would be greatly appreciated.

Jeff



 
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
macro to delete the last value in each column z.entropic Excel Worksheet Functions 11 July 21st 07 01:10 PM
Delete a Column when in a Macro-Worksheet Event? jeannie v Excel Worksheet Functions 2 July 19th 07 01:58 AM
how i delete other like words in excel? mohsen Excel Discussion (Misc queries) 1 March 2nd 07 01:32 PM
set up a macro to delete characters in each cell of a column Rick Excel Discussion (Misc queries) 2 September 18th 05 03:02 AM
how do i insert words into a column without erasing the words soccer5585 Excel Discussion (Misc queries) 0 June 8th 05 11:06 PM


All times are GMT +1. The time now is 05:20 AM.

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

About Us

"It's about Microsoft Excel"