Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have the following code in VBA to give me some variance % results. Although the rows are always static the columns are not: ActiveCell.FormulaR1C1 = "=SUM(R[-34]C-R[-17]C)/R[-17]C" ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "=SUM(R[-32]C-R[-15]C)/R[-15]C" ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "=SUM(R[-30]C-R[-13]C)/R[-13]C" What I want this to do is to start in row 45, in the column i am in (worked out prior to this in the macro) and put in a formula which basically in Excel would read: =SUM(I11-I28)/I28 then down one row =SUM(I13-I30)/I30 then down one row =SUM(I15-I32)/I32 This works, but only for the 1st and 3rd formulae, the second one is always wrong by one row... Am I doing something majorly wrong here? Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple subtraction formula returning strange results = Excel glitc | Excel Worksheet Functions | |||
VLOOKUP formula results strange after copying down | Excel Worksheet Functions | |||
Use dynamic column reference without R1C1 | Excel Worksheet Functions | |||
Copy a R1C1 formula to a user defined range results #NAME? error | Excel Programming | |||
Dynamic Range in Macro with R1C1 | Excel Programming |