Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Add complicated cell formula within a macro

I am attempting to add a complicated cell formula to a cell (within a macro)
and then copy it down across a number of rows. The formula is so complicated
that I don't wish to re-type "keystroke by keystroke" when recording the
macro. Is there a way to "copy" the formula from another worksheet in such a
way that the macro recorder interprets the information entered as a formula
and NOT as literally as a "copy cell formula from cell1 to cell 2"?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Add complicated cell formula within a macro

hi,
you can play a mind game with excel. put an apostrophe in front of the
equals sign. excel with then look on the formula as text and not a formula.
you can then copy the formula and paste it into your code. I use this trick a
lot when helping people out here with formulas. if i copy the formula and
paste it into the reply, the formula results are pasted and not the formula.
if i do the apostrophe thing, the formula is pasted and not the results. and
without the apostrophe.

Regards
FSt1

"Eric_G" wrote:

I am attempting to add a complicated cell formula to a cell (within a macro)
and then copy it down across a number of rows. The formula is so complicated
that I don't wish to re-type "keystroke by keystroke" when recording the
macro. Is there a way to "copy" the formula from another worksheet in such a
way that the macro recorder interprets the information entered as a formula
and NOT as literally as a "copy cell formula from cell1 to cell 2"?

Reply
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
Creating macro for slightly complicated formula CNN Excel Discussion (Misc queries) 1 May 4th 10 06:40 AM
Complicated Cell Formula mjones Excel Worksheet Functions 9 September 28th 07 09:26 PM
complicated macro SteveDB1 Excel Programming 5 July 5th 07 03:28 AM
Complicated formula or macro A.S. Excel Discussion (Misc queries) 3 September 6th 06 06:21 PM
Unable to record complicated formula in macro [email protected] Excel Programming 1 January 18th 06 10:20 PM


All times are GMT +1. The time now is 05:58 PM.

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

About Us

"It's about Microsoft Excel"