W
wrlux
I am trying to record a simple macro to put a colon in front of the
character second from the right in a cell. Here's my issue:
I go to a cell, (let's say it has the number 1030 in it)
I start the macro recorder, give is a shortcut key (say, "W")
I click on the relative reference icon
I press F2 to edit the cell
I use the left arrow to move two positions to the left
I type in a colon (":")
I press return
Then I click on the end recording button
Now, what I want to happen is the when I go to the next cell and press
CTRIL-W is to have a colon inserted in front of the second character
from the right. So if this cell has the number 1045 in it I expect it
to end up as 10:45. What happens is it overwrites that cell with the
value from the previous cell with the colon in it. Instead of 10:45 I
get 10:30 again, and again, and again......sigh. Looking at the maco
in the VB editor, sure enough, theres the text "10:35". I don't want
the text. I want only the commands to enter edit mode in the current
cell and move two places to the left and insert a colon. In the
preVBA days this was SO easy: {edit}{left}{left}":"{down} and you were
done. That's all I want!
Thanks!
character second from the right in a cell. Here's my issue:
I go to a cell, (let's say it has the number 1030 in it)
I start the macro recorder, give is a shortcut key (say, "W")
I click on the relative reference icon
I press F2 to edit the cell
I use the left arrow to move two positions to the left
I type in a colon (":")
I press return
Then I click on the end recording button
Now, what I want to happen is the when I go to the next cell and press
CTRIL-W is to have a colon inserted in front of the second character
from the right. So if this cell has the number 1045 in it I expect it
to end up as 10:45. What happens is it overwrites that cell with the
value from the previous cell with the colon in it. Instead of 10:45 I
get 10:30 again, and again, and again......sigh. Looking at the maco
in the VB editor, sure enough, theres the text "10:35". I don't want
the text. I want only the commands to enter edit mode in the current
cell and move two places to the left and insert a colon. In the
preVBA days this was SO easy: {edit}{left}{left}":"{down} and you were
done. That's all I want!
Thanks!