-1
The code below does not execute on the following lines:
Sub concatena()
linha = 13
Do While Cells(linha, 2) <> ""
Dim Data As String
Data = Cells(linha + 1, 2)
Range("q13").Select
ActiveCell.Value = Format(Data, "mmmm" & "yyyy")
Range("r13").Select
ActiveCell.Value = Range("q13") & Range("k13")
Range("v13").Select
Selection = Range("i13") & Range("n13") & Range("j13")
With Selection
Dim x As String
x = Cells(linha, 2)
If x < Sheets("FLC").Range("m4") Then
Range("s13") = Sheets("FLC").Range("E9")
Else
Range("s13") = Sheets("FLC").Range("F9")
End If
If x < Sheets("FLC").Range("m4") Then
Range("t13") = Range("i13") & Sheets("FLC").Range("E9")
Else
Range("s13") = Range("i13") & Sheets("FLC").Range("F9")
End If
If x < Sheets("FLC").Range("m4") Then
Range("u13") = Sheets("Tabelas").Range("w2") & Range("j13") & Range("i13")
Else
Range("u13") = Sheets("Tabelas").Range("w3") & Range("j13") & Range("i13")
End If
End With
linha = linha + 1
Loop
End Sub
Gives what mistake, and where?
– César Rodriguez
Also, I have the impression that the code could be better architected. If you could explain better what your intention is and what the context is, it would be easier to give an answer.
– César Rodriguez