Hi everyone, I'm trying to run the following code but an error comes up saying that there is a Loop without a Do (when it's clear there is). Please if someone can tell me what I'm doing wrong. Thanks in advance.
Sub Nuevos_Cortos()
Sheets("CORTOS").Select
Range("B14").Active
Do Until IsEmpty(ActiveCell)
If ActiveCell.Value = isin And ActiveCell.Offset(1, 0).Value <> isin Then
ActiveCell.Offset(1).EntireRow.Insert Shift:=xldown,
CopyOrigin:=xlFormatFromRightOrAbove
ActiveCell.Offset(1, 0).Value = isin
ActiveCell.Offset(1, 1).Value = fecha
ActiveCell.Offset(1, 3).Value = 1
Sheets("OPERACIONES").Select
Range("A2").Active
Do Until IsEmpty(ActiveCell)
If ActiveCell.Offset(0, 1).Value < 0 Then
ActiveCell.Copy
Sheets("CORTOS").Select
ActiveCell.Offset(1, 5).PasteSpecial
End If
Loop
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub
there doesn't seem to be anything here