Sub Concat()
Set ww = Workbooks("classeur(1).xlsx")
Set ra = ww.Sheets("A").Cells(2, 1)
Set rb = ww.Sheets("B").Cells(2, 1)
Set wx = ww.Sheets("X").Cells(100000, 13).End(xlUp).Offset(1, 0)
Do While ra & ra.Offset(0, 1) <> ""
    If Left(ra.Offset(0, 36), 1) = "x" Then
        wx.Offset(0, 0) = ra.Offset(0, 1)
        wx.Offset(0, 1) = ra.Offset(0, 2)
        wx.Offset(0, 2) = ra.Offset(0, 3)
        wx.Offset(0, -6) = ra.Offset(0, 4)
        wx.Offset(0, -5) = ra.Offset(0, 5)
        wx.Offset(0, -4) = ra.Offset(0, 6)
        wx.Offset(0, -3) = ra.Offset(0, 7)
        wx.Offset(0, -2) = ra.Offset(0, 8)
        wx.Offset(0, -1) = ra.Offset(0, 9)
        Set wx = wx.Offset(1, 0)
    End If
    Set ra = ra.Offset(1, 0)
Loop
Do While rb <> ""
    If Left(rb.Offset(0, 34), 1) = "x" Then
        wx.Offset(0, 0) = rb.Offset(0, 0)
        wx.Offset(0, 1) = "L"
        wx.Offset(0, 2) = rb.Offset(0, 1)
        wx.Offset(0, -6) = rb.Offset(0, 2)
        wx.Offset(0, -5) = "L"
        wx.Offset(0, -4) = rb.Offset(0, 3)
        wx.Offset(0, -3) = rb.Offset(0, 4)
        wx.Offset(0, -2) = rb.Offset(0, 5)
        wx.Offset(0, -1) = rb.Offset(0, 6)
        Set wx = wx.Offset(1, 0)
    End If
    Set rb = rb.Offset(1, 0)
Loop
End Sub