LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro code question Maria Excel Discussion (Misc queries) 6 March 7th 09 08:44 AM
vb code question Stan Excel Discussion (Misc queries) 0 April 28th 08 04:43 PM
A macro code question from a novice Richard Excel Discussion (Misc queries) 2 December 24th 07 07:22 PM
VBA Code Question Theresa[_4_] Excel Programming 6 October 16th 03 07:06 PM
Macro Code Question for Newbe DataMan Excel Programming 2 September 22nd 03 07:39 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"