montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 986
- Office Version
- 2010
- Platform
- Windows
Hello Everybody. PLEASE, I have two sheets and one dynamic array in each one, what I need is to subtract row by row one from another.
On sheet 1 my array is for example purpose A1:F30, and on sheet 2 B2:G30 [in my workbook each are 6 by 2521 and growing].
this is the macro for better understanding purpose:
Really appreciate the time you've taken out of your schedule to help me.
On sheet 1 my array is for example purpose A1:F30, and on sheet 2 B2:G30 [in my workbook each are 6 by 2521 and growing].
this is the macro for better understanding purpose:
Code:
Sub Macro1()
Range("H1").Select
ActiveCell.FormulaR1C1 = "=RC[-7]-Sheet2!R[1]C[-6]"
Range("H1").Select
Selection.AutoFill Destination:=Range("H1:H23"), Type:=xlFillDefault
Range("H1:H23").Select
Range("I1").Select
ActiveCell.FormulaR1C1 = "=RC[-7]-Sheet2!R[1]C[-6]"
Range("I1").Select
Selection.AutoFill Destination:=Range("I1:I23"), Type:=xlFillDefault
Range("I1:I23").Select
Range("J1").Select
ActiveCell.FormulaR1C1 = "=RC[-7]-Sheet2!R[1]C[-6]"
Range("J1").Select
Selection.AutoFill Destination:=Range("J1:J23"), Type:=xlFillDefault
Range("J1:J23").Select
End Sub