Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Andy
 
Posts: n/a
Default Keyboard Macro Just Copies Content of Previous Cell

I created a simple keyboard macro to edit the contents of a cell by simply
inserting a "b" in a particular position. For example, I have a series of
alphanumeric numbers that start with S1253, e.g., S12536675. I wanted to
insert a "b" after the first five digits on the left to revise the series of
alphanumeric numbers to start with S1253b, e.g..S1253b6675. However, after
creating the keyboard macro, when I run the macro on the next cell to be
edited (i.e., S12536676), the macro simply copies the contents of the
original cell that I edited when I first created the keyboard macro (i.e.,
S1253b6675), rather than simply inserting a "b" n the fifth position from the
left as I desired. Any ideas on what is going on here???
--
Andy
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Keyboard Macro Just Copies Content of Previous Cell

It is probably hard-coded as say

Activecell.Value = "S1253b6675"

change it to

With Activecell
.Value = Left(.value,4) & "b" & _
Right(.Value, Len(.Value) - 4)
End WIth

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Andy" wrote in message
...
I created a simple keyboard macro to edit the contents of a cell by simply
inserting a "b" in a particular position. For example, I have a series of
alphanumeric numbers that start with S1253, e.g., S12536675. I wanted to
insert a "b" after the first five digits on the left to revise the series

of
alphanumeric numbers to start with S1253b, e.g..S1253b6675. However,

after
creating the keyboard macro, when I run the macro on the next cell to be
edited (i.e., S12536676), the macro simply copies the contents of the
original cell that I edited when I first created the keyboard macro (i.e.,
S1253b6675), rather than simply inserting a "b" n the fifth position from

the
left as I desired. Any ideas on what is going on here???
--
Andy



Reply
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
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
in cell editing macro ynissel Excel Discussion (Misc queries) 2 July 27th 05 07:28 PM
Relative Cell position NOT working with or without macro Scratching my Head Excel Discussion (Misc queries) 6 May 30th 05 06:12 PM
Perform oiperations relative to initial selected cell scratching my head Excel Discussion (Misc queries) 1 May 30th 05 05:42 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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

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"