Macro no compila, espero me puedan ayudar
Publicado por Gabriel (6 intervenciones) el 22/09/2011 16:16:08
Sub llena_dos()
Dim var As Range
Dim ver As Range
Dim distancia As Double
Dim lineafin As Integer
For i = 2 To 243
lineafin = Worksheets("Proyectables_OK").Cells(i, 101).Value
var = Worksheets("Proyectables_OK").Range(Cells(i, 2), Cells(i, lineafin)).Value
For j = 2 To 75
ver = Worksheets("Listas").Range(Cells(j, 2), Cells(j, lineafin)).Value
distancia = Application.WorksheetFunction.SumXMY2(var, ver)
Worksheets("distancias").Cells(i + 1, j + 1).Value = distancia
Next j
Next i
End Sub
Dim var As Range
Dim ver As Range
Dim distancia As Double
Dim lineafin As Integer
For i = 2 To 243
lineafin = Worksheets("Proyectables_OK").Cells(i, 101).Value
var = Worksheets("Proyectables_OK").Range(Cells(i, 2), Cells(i, lineafin)).Value
For j = 2 To 75
ver = Worksheets("Listas").Range(Cells(j, 2), Cells(j, lineafin)).Value
distancia = Application.WorksheetFunction.SumXMY2(var, ver)
Worksheets("distancias").Cells(i + 1, j + 1).Value = distancia
Next j
Next i
End Sub
Valora esta pregunta


0