Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modifying a formula via code
Message
From
07/11/2001 17:29:22
 
 
To
All
General information
Forum:
Visual Basic
Category:
VBA
Title:
Modifying a formula via code
Miscellaneous
Thread ID:
00578788
Message ID:
00578788
Views:
36
In Excel, I have VBA code that automatically creates this formula :

=IF(ISNUMBER(J609),TREND(D604:D609,B604:B609,B609),"")

But when it creates the formula, the ranges change depending upon the data.
Here is the code that creates that formula :

ActiveCell.Offset(0, 3).FormulaR1C1 = "=IF(ISNUMBER(RC[-3]),TREND(R[-5]C[-9]:RC[-9],R[-5]C[-11]:RC[-11],RC[-11]),"""")"

The problem is, I need some absolute values coded in this thing, and can't figure out how to get them in there. Here is how I would LIKE the formula to look upon creation:

=IF(ISNUMBER(J609),TREND(D$604:D$609,B$604:B$609,B609),"")

What can be done to get those little $ buggers in there from the code, so I
don't have to manually edit the formula by hand? THANKS!

Seth
Reply
Map
View

Click here to load this message in the networking platform