#### pedrofilipegomes

##### New Member

- Joined
- Jul 29, 2015

- Messages
- 25

The error is in this code:

"

Dim i, k As Long

i = 0

k = 0

While Cells(i + 1, 1) <> ""

i = i + 1

If i = 1 Then

k = k + 1

Sheets("Final").Cells(k, 1) = Cells(i, 1)

Sheets("Final").Cells(k, 2) = Cells(i, 2)

Sheets("Final").Cells(k, 3) = Cells(i, 3)

Sheets("Final").Cells(k, 4) = Cells(i, 4)

Sheets("Final").Cells(k, 5) = Cells(i, 5)

Sheets("Final").Cells(k, 6) = Cells(i, 6)

Sheets("Final").Cells(k, 7) = Cells(i, 7)

Sheets("Final").Cells(k, 8) = Cells(i, 8)

Sheets("Final").Cells(k, 9) = Cells(i, 9)

**ElseIf Cells(i, 11) <> "Não" And (Cells(i, 12) = "FUTURA" Or Cells(i, 12) = "CORRENTE" Or Cells(i, 12) = "PERMANENTE") Then**

k = k + 1

Sheets("Final").Cells(k, 1) = Cells(i, 1)

Sheets("Final").Cells(k, 2) = Cells(i, 2)

Sheets("Final").Cells(k, 3) = Cells(i, 3)

Sheets("Final").Cells(k, 4) = Cells(i, 4)

Sheets("Final").Cells(k, 5) = Cells(i, 5)

Sheets("Final").Cells(k, 6) = Cells(i, 6)

If Sheets("Extract").Cells(i, 13) = "" Then

Else

Sheets("Final").Cells(k, 7) = Cells(i, 13)

End If

Sheets("Final").Cells(k, 8) = Cells(i, 8)

Sheets("Final").Cells(k, 9) = Cells(i, 9)

End If

Wend

"

k = k + 1

Sheets("Final").Cells(k, 1) = Cells(i, 1)

Sheets("Final").Cells(k, 2) = Cells(i, 2)

Sheets("Final").Cells(k, 3) = Cells(i, 3)

Sheets("Final").Cells(k, 4) = Cells(i, 4)

Sheets("Final").Cells(k, 5) = Cells(i, 5)

Sheets("Final").Cells(k, 6) = Cells(i, 6)

If Sheets("Extract").Cells(i, 13) = "" Then

Else

Sheets("Final").Cells(k, 7) = Cells(i, 13)

End If

Sheets("Final").Cells(k, 8) = Cells(i, 8)

Sheets("Final").Cells(k, 9) = Cells(i, 9)

End If

Wend

"

**The line where i have error is marked with red bold.**

Anyone can help

Anyone can help

**me?**

Thank's

Thank's