Hola a todos,
Tengo este error que salta en la línea que esta marcada donde esta la
formula. Puede ser la variable que esta dentro? Si alguno puede darme
una mano se lo agradeceré muchiissimo!
Sub HRP_Formulas()
Dim iRow As Integer
Dim StartRow As Integer
Dim EndRow As Integer
Dim lCol As Integer
Dim Addx As String
Range("A11").Select
iRow = ActiveCell.Row
Do
StartRow = iRow + 1
Selection.End(xlDown).Select
EndRow = ActiveCell.Row
EndRow = EndRow - 1
If Cells(iRow, 1) = "Retroporting" Then
iRow = iRow + 1
End If
Cells(iRow, 1).Select
If Cells(iRow, 1).Interior.ColorIndex = 46 Then
lCol = 5
Do While lCol <= 8
Addx = Range(Cells(StartRow, 1), Cells(EndRow, 1)).Address
Cells(iRow, lCol).Formula = "=COUNTA(" & Addx & ")"
lCol = lCol + 1
Loop
End If
lCol = 9
Do While lCol <= 23
Addx = Range(Cells(StartRow, lCol), Cells(EndRow,
lCol)).Address
Cells(iRow, lCol).Formula = "=COUNTA(" & Addx & ")"
lCol = lCol + 1
Loop
Addx = Range(Cells(StartRow, 24), Cells(EndRow, 24)).Address
(RowAbsolute:=False, ColumnAbsolute:=False)
Cells(iRow, 24).Formula = "=IF(ISERR(AVERAGE(" & Addx & "));
""""; AVERAGE(" & Addx & "))" <ERROR EN ESTA LINEA
iRow = EndRow + 1
If Cells(iRow, 1) = "HRP Target" Then
Exit Sub
End If
Loop
End Sub
Leer las respuestas