Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

constant in a .formula statement

Status
Not open for further replies.

basbrian

Programmer
Feb 18, 2002
49
AU
I am currently using the following code to populate cells with a formula
Code:
Dest.Cells(sRow, 10).Select
ActiveCell.FormulaR1C1 = "=if(RC[-2]<>""-"",(RC[-2]-RC[-1]),"""")"
I am now going to have a variable number of columns that this formula has to go in and also the RC[-1] col is going be always col A.
How do I change RC[-1] to refer to col A??
 
RC1

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PH,
when I use RC1, I get the value from cell srow,11 and not srow 1 (srow:A)
 
I said RC1, not RC[1]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top