Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copying cell names | Excel Discussion (Misc queries) | |||
in cell editing macro | Excel Discussion (Misc queries) | |||
Relative Cell position NOT working with or without macro | Excel Discussion (Misc queries) | |||
Perform oiperations relative to initial selected cell | Excel Discussion (Misc queries) | |||
GET.CELL | Excel Worksheet Functions |