PC Review


Reply
Thread Tools Rate Thread

How do Macro to EDIT cells?

 
 
George
Guest
Posts: n/a
 
      27th Sep 2004
Am using MS Excel XP (2002). All I want to do is a short macro to, in
effect, press F2 (to EDIT the cell), then let's say delete the first
character of the cell and change it to let's say X, like this...


Before:
_Mary Jones
*Joe Smith
%Peter Rabbbit

After:
XMary Jones
XJoe Smith
XPeter Rabbbit

I just want to put the cursor on a given cell, click CNTL-A to run the
macro, and have it change one cell at a time. There are reasons why I can't
use the search and replace. Problem is... if I record the macro (turn it
on, press the key sequences, F2, Home, Delete, X, GoDownOneCell, turn it
off), it puts XMary Jones in all the cells, like this (I think it isn't
interpretting the F2 key correctly)...

After:
XMary Jones
XMary Jones
XMary Jones

Would appreciate any suggestions, thanks, George.



 
Reply With Quote
 
 
 
 
Earl Kiosterud
Guest
Posts: n/a
 
      27th Sep 2004
George,

Sub ChangeX()
ActiveCell = "X" & Mid(ActiveCell,2,999)

End Sub

To assign a shortcut key, use Tools - Macro - Macros, select the macro,
click Options, and put in the shortcut.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"George" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Am using MS Excel XP (2002). All I want to do is a short macro to, in
> effect, press F2 (to EDIT the cell), then let's say delete the first
> character of the cell and change it to let's say X, like this...
>
>
> Before:
> _Mary Jones
> *Joe Smith
> %Peter Rabbbit
>
> After:
> XMary Jones
> XJoe Smith
> XPeter Rabbbit
>
> I just want to put the cursor on a given cell, click CNTL-A to run the
> macro, and have it change one cell at a time. There are reasons why I

can't
> use the search and replace. Problem is... if I record the macro (turn it
> on, press the key sequences, F2, Home, Delete, X, GoDownOneCell, turn it
> off), it puts XMary Jones in all the cells, like this (I think it isn't
> interpretting the F2 key correctly)...
>
> After:
> XMary Jones
> XMary Jones
> XMary Jones
>
> Would appreciate any suggestions, thanks, George.
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to edit cells esskaykay Microsoft Excel Programming 0 9th Aug 2006 09:28 PM
Macro to edit cells Dean Microsoft Excel Programming 3 21st Jul 2006 07:18 AM
Using a macro to edit cells? bdunk Microsoft Excel Discussion 2 1st Oct 2004 09:17 PM
How do Macro to EDIT cells? George Microsoft Excel Programming 1 27th Sep 2004 02:35 PM
Edit a group of cells with a macro =?Utf-8?B?TWljaGFlbCBDUEE=?= Microsoft Excel Misc 3 6th Jul 2004 04:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 AM.