Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Set formula as variable w/o "=" sign

I have the following formula in my cell
=AVERAGE(OFFSET(C15,-3,0,-12,1))

I want to set a variable as the formula, such as
MyFormula = ActiveCell.Formula

How can I get rid of the "=" sign at the beginning? I basically need to add
a condition to the beginning and end of the formula and don't want the "="
inserted in the middle.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Set formula as variable w/o "=" sign

MyFormula = Mid$(ActiveCell.Formula, 2)

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"StephanieH" wrote in message
...
I have the following formula in my cell
=AVERAGE(OFFSET(C15,-3,0,-12,1))

I want to set a variable as the formula, such as
MyFormula = ActiveCell.Formula

How can I get rid of the "=" sign at the beginning? I basically need to
add
a condition to the beginning and end of the formula and don't want the "="
inserted in the middle.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Set formula as variable w/o "=" sign

Stephanie,

MyFormula = Mid(ActiveCell.Formula, 2, Len(ActiveCell.Formula))

HTH,
Bernie
MS Excel MVP


"StephanieH" wrote in message
...
I have the following formula in my cell
=AVERAGE(OFFSET(C15,-3,0,-12,1))

I want to set a variable as the formula, such as
MyFormula = ActiveCell.Formula

How can I get rid of the "=" sign at the beginning? I basically need to add
a condition to the beginning and end of the formula and don't want the "="
inserted in the middle.



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
How to handle a minus sign "-" as text not as part of a formula? Claudia d'Amato Excel Discussion (Misc queries) 3 April 2nd 23 07:09 PM
What is purpose of + sign in formula "=+Q290*10" Sasser Excel Discussion (Misc queries) 3 October 23rd 08 05:56 PM
How to "sign" macro with "digital certificate"? Clueless in Seattle New Users to Excel 5 March 23rd 08 02:48 AM
How do display a "+" or "-" sign when hiding columns? DTI Tustin Setting up and Configuration of Excel 1 July 13th 06 01:21 PM
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" Luc[_3_] Excel Programming 2 September 28th 05 08:37 PM


All times are GMT +1. The time now is 11:10 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"