Sorry for asking such an newbie question. I am trying to create a macro(VBA) that takes two cells in one worksheet and displays the result in another worksheet. The problem I am having is that when I am in the active worksheet that has the macro I just created see below:
Sub Wk2()
'
' Wk2 Macro
' Macro recorded 10/10/2006
'
'
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-2]C:R[-1]C)"
Range("C11").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-3]C[1]:R[-2]C[1])"
Range("C12").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-4]C[3]:R[-3]C[3])"
Range("C13").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-5]C[4]:R[-4]C[4])"
Range("C20").Select
ActiveWindow.SmallScroll Down:=9
Range("C32").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-24]C[6]:R[-23]C[6])"
Range("C33").Select
ActiveWindow.SmallScroll Down:=-18
Range("B3
3").Select
ActiveCell.FormulaR1C1 = "Period 1 WK 2"
Range("B4").Select
it sometimes won't put the result in the cell I selected in the sum function. I will get random data in cells that the cursor was in(only the first one). Can someone plese help me to understand how to tell the VBA to start and put the data in only the cells I have chosen. And yes I have the macro set to relative off.
Sub Wk2()
'
' Wk2 Macro
' Macro recorded 10/10/2006
'
'
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-2]C:R[-1]C)"
Range("C11").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-3]C[1]:R[-2]C[1])"
Range("C12").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-4]C[3]:R[-3]C[3])"
Range("C13").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-5]C[4]:R[-4]C[4])"
Range("C20").Select
ActiveWindow.SmallScroll Down:=9
Range("C32").Select
ActiveCell.FormulaR1C1 = "=sum('06 ROP'!R[-24]C[6]:R[-23]C[6])"
Range("C33").Select
ActiveWindow.SmallScroll Down:=-18
Range("B3
ActiveCell.FormulaR1C1 = "Period 1 WK 2"
Range("B4").Select
it sometimes won't put the result in the cell I selected in the sum function. I will get random data in cells that the cursor was in(only the first one). Can someone plese help me to understand how to tell the VBA to start and put the data in only the cells I have chosen. And yes I have the macro set to relative off.