Macro code question
ActiveCell.Offset(columnoffset:=1).Select
Selection.Copy
ActiveCell.Offset(columnoffset:=-1).Select
ActiveCell.Numberformat = "General"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
' Activecell.??? what can I put here to perform what F2 key and enter
does???
ActiveCell.Offset(rowoffset:=1).Select
Should fix it.
if it doesn't then the formula you are pasting may be referring to a cell
formatted as Text. If so, can you change the formatting on that cell?
--
Regards,
Tom Ogilvy
"anderson101" wrote in message
...
I have created a very simple macro to copy the contents of one cell and
paste it in another effectively creating an =If forumla. However, this new
forumla will not "activate?" until I hit the F2 key and hit enter. If
someone can show me the code I can use to automatically perform this
function in any way (F2 then enter), I would be very appreciative! here is
the code I have and the line I am having a problem with:
ActiveCell.Offset(columnoffset:=1).Select
Selection.Copy
ActiveCell.Offset(columnoffset:=-1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
' Activecell.??? what can I put here to perform what F2 key and enter
does???
ActiveCell.Offset(rowoffset:=1).Select
Thank you!
|