danbrawl93
New Member
- Joined
- Dec 15, 2016
- Messages
- 17
Hey guys,
I have the following code and I keep getting a "next without for" error, although I can't seem to debug it! I've tried to strip the code to its raw "For" and "If" statements.
Can anybody help me out by finding how the code needs to be adjusted? Thanks so much!!!
I have the following code and I keep getting a "next without for" error, although I can't seem to debug it! I've tried to strip the code to its raw "For" and "If" statements.
Code:
If existing_sheet = 1 Then
For x = i + 1 To i + 100
If Worksheets("Master Fee Table").Cells(x, MNC).Value = "" Then
Exit For
Else:
End If
If WorksheetFunction.CountIf(Range("A3:A1000"), mandate_no) > 0 Then
Else:
End If
If existing_mandate = 1 Then
For y = 3 To 1000
If WorksheetFunction.Count(Range(Cells(y, 1), Cells(1000, 1))) = 0 Then
Exit For
End If
If Cells(y - 1, 1).Value = mandate_no And Cells(y, 2).Value = "Portfolio No." Then
For z = 4 To 1000
If Cells(y, z).Value = "" Then
Exit For
End If
Next z
End If
If Cells(y, 1).Value = mandate_no And InStr(1, Cells(y, 2), mandate_no) > 0 Then
End If
Next y
For y = 3 To 10000
If WorksheetFunction.Count(Worksheets("Portfolio").Range(Cells(y, 16), Cells(1000, 16))) = 0 Then
Exit For
End If
If WorksheetFunction.CountIf(Range("B5:B1000"), Worksheets("Portfolio").Cells(y, 16)) = 0 Then
End If
Next y
Next x
End If
Can anybody help me out by finding how the code needs to be adjusted? Thanks so much!!!
