1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Sub Macro1()
With Application
.ScreenUpdating = False
.DisplayStatusBar = False
.Calculation = xlCalculationManual
End With
Range("G12").FormulaR1C1 = "=VLOOKUP(RC[-5],R[6]C[5]:R[11]C[10],6)"
Range("G12").AutoFill Range("G122:G" & Range("B65536").End(xlUp).Row)
Range("F12").FormulaR1C1 = "=SUM(RC[-2]*RC[-1])"
Range("F12").AutoFill Range("F12:F" & Range("B65536").End(xlUp).Row)
Range("D12").FormulaR1C1 = "=VLOOKUP(RC[-2],R[6]C[9]:R[11]C[14],2)"
Range("D12").AutoFill Range("D12:D" & Range("B65536").End(xlUp).Row)
Range("C12").FormulaR1C1 = "=VLOOKUP(RC[-1],R[6]C[9]:R[11]C[14],2)"
Range("C12").AutoFill Range("C12:C" & Range("B65536").End(xlUp).Row)
Range("C12").HorizontalAlignment = xlCenter
Range("C12").VerticalAlignment = xlCenter
With Application
.Calculation = xlCalculationAutomatic
.DisplayStatusBar = True
.CutCopyMode = False
.ScreenUpdating = True
End With
End Sub |