View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default How do I repeat key strokes in Excel?

Here is some code to do what you have ascked...

Public Sub TrimLast2()
With ActiveCell
If Len(.Value) = 2 Then
.Value = Left(.Value, Len(.Value) - 2)
.Offset(1, 0).Select
End If
End With
End Sub

HTH

"ross_76102" wrote:

I tried recording the following macro.
F2 - Select current cell
Shift arrow left
backspace - (to delete one character)
shirt arrow left
backspace - (to delect one character)
enter - which advance to next cell down.

instead the macro records the value that I was working with after the 2
backspaces, instead I want it to perform the key strokes as entered.

Please help.