Macro recording
Thanks a million Jim,
Your solution seems absolute magic! And yet it seems so
wonderfully simple - makes me wonder why I hadn't thought
of it. That's probably why you're MVP!
Thanks again.
Ron
-----Original Message-----
Is there a way of recording a macro that will perform
the
keystrokes that we do - including editing of cells by
using the "F2" function key.
No. Excel records the results of what you do, not
necessarily the steps
that you perform.
When trying to do this by recording, the recording seems
to switch off when I go into edit mode.
Right. You can neither record nor run macros when in
Edit mode.
In Excel you have to "describe" what you want to happen
in programming
terms. For example this may be what you want:
Sub a()
Dim CurrFormula As String
CurrFormula = Mid(ActiveCell.Formula, 2) 'Drop "="
ActiveCell.Formula = "=if(Iserr(" & CurrFormula & _
"),0," & CurrFormula & ")"
End Sub
--
Jim Rech
Excel MVP
.
|