View Single Post
  #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