Hey guys.
Im trying to cross data in columns but this isn't working.
If it was in a row I would do:
Dim rcnt As Long ' buscar informação sobre a ordem de produção
rcnt = Folha6.Range("G" & Rows.Count).End(xlUp).Row
' centro de trabalho
For i = 2 To rcnt
If Folha6.Range("G" & i) = Label5 Then
Label6 = Folha6.Range("I" & i)
End If
Next
but with columns... I don't know how do it..
If BalerTwine.ComboBox4.Value = "1114" Then
Dim x As Single
x = Val(Label20.Caption)
Dim mesmabobine As Long ' buscar informação sobre a bobines
Dim i As Integer ' nº de registos existentes
mesmabobine = Folha3.Cells(2, Columns.Count).End(xlToLeft).Column
For i = 1 To mesmabobine
Dim k11 As Integer ' nº de registos existentes
k11 = 1
Do While Folha3.Cells(3 + k11, i + 1) <> "" ' ciclo criado para saber em que posição entra o proximo registro
k11 = k11 + 1
Loop
If Folha3.Cells("2" & i) = Label8.Caption Then
Folha3.Cells(2, i) = ""
Folha3.Cells(3, i) = ""
Folha3.Cells(3 + k11, i) = x
Else
Folha3.Cells(2, i) = BalerTwine.ComboBox5.Text
Folha3.Cells(3, i) = Application.WorksheetFunction.VLookup(BalerTwine.ComboBox5.Text, Folha30.Range("J2", "BA5000"), 13, False)
Folha3.Cells(3 + k11, i) = x
End If
Next
End If
Can anyone help me? Thanks in advance.
Bookmarks