Amortiguar i como número entero
i = gama (“A1”). Extremo (xlDown). Fila
Application.ScreenUpdating = falso
Gama (“D1”). Selecto
ActiveCell.FormulaR1C1 = “cantidad”
Gama (“D2”). Selecto
ActiveCell.FormulaR1C1 = _
“=SUMPRODUCT ((RC [- 3] =R2C1: R” y i y “C1) * (RC [- 2] =R2C2: R” y i y “C2), R2C3: R” y i y “C3)”
Gama (“D2”). Selecto
Selection.Copy
Gama (selección, Selection.End (xlDown)). Selecto
ActiveSheet.Paste
Application.CutCopyMode = falso
Selection.Copy
Gama (“D2”). Selecto
Goma de Selection.PasteSpecial: =xlPasteValues, operación: =xlNone, _ de SkipBlanks
: El =False, transporta: =False
Gama (“C2”). Selecto
Application.CutCopyMode = falso
Selection.EntireColumn.Delete
Gama (“A1”). Selecto
Gama (“A1: Acción de C” y de i) .AdvancedFilter: =xlFilterCopy, CopyToRange: =Range (_
“D1”), único: =True
Gama (“A1: C1”). Selecto
Selection.EntireColumn.Delete
Gama (“A1”). Selecto
Application.ScreenUpdating = verdad
Submarino del extremo
|