Hi! I'm working on an excel file that has 2 tables. I need to get the difference of 2 cells, each coming from the two tables. Ex:
tables 1 has: table 2 has: result should be:
1 2 3 3 2 1 -2 0 2
4 5 6 6 5 4 -2 0 2
7 8 9 9 8 7 -2 0 2
I need to get the difference of the two cells ex., 1-3 = -2 where 1 is from table 1; 3 is from table 2. The rest of the cells should have the same formula.
I have this code (which I generated from the recorded macro):
Public Sub Computation()
Range("AC211"
.Select
ActiveCell.FormulaR1C1 = "=R[-44]C-R[-22]C"
Range("AC212"
.Select
ActiveWindow.SmallScroll Down:=12
Range("AC211"
.Select
Selection.AutoFill Destination:=Range("AC211:AC230"
,
Type:=xlFillDefault
Range("AC211:AC230"
.Select
Selection.AutoFill Destination:=Range("AC211:AV230"
,
Type:=xlFillDefault
Range("AC211:AV230"
.Select
End Sub
... since it uses the autofill method, it does not update the result immediately. The Calculation Option of MS Excel is set to manual. How should I go about it?
tables 1 has: table 2 has: result should be:
1 2 3 3 2 1 -2 0 2
4 5 6 6 5 4 -2 0 2
7 8 9 9 8 7 -2 0 2
I need to get the difference of the two cells ex., 1-3 = -2 where 1 is from table 1; 3 is from table 2. The rest of the cells should have the same formula.
I have this code (which I generated from the recorded macro):
Public Sub Computation()
Range("AC211"
ActiveCell.FormulaR1C1 = "=R[-44]C-R[-22]C"
Range("AC212"
ActiveWindow.SmallScroll Down:=12
Range("AC211"
Selection.AutoFill Destination:=Range("AC211:AC230"
Type:=xlFillDefault
Range("AC211:AC230"
Selection.AutoFill Destination:=Range("AC211:AV230"
Type:=xlFillDefault
Range("AC211:AV230"
End Sub
... since it uses the autofill method, it does not update the result immediately. The Calculation Option of MS Excel is set to manual. How should I go about it?