Erreur de compilation sans ligne en surbrillance

Je reçois une erreur de compilation: expression attendue. Aucune ligne n'est mise en surbrillance XD

Sub name() Dim arr() As Ssortingng Dim lastRow As Long c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = arr(e) c = c + 1 Next Set arr = Empty Next End With End Sub 

Comme @gtwebb a déclaré que le nom était le problème principal.

Il y a eu une autre chose mineure que j'ai trouvée: le debugging:

 Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Sous-Nom2 () Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Dim e As Variant Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Dim lastRow As Long Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Dim c As Integer Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Dim arr () As Ssortingng Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub c = 2 Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Avec ActiveSheet Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub lastRow = .Cells (.Rows.Count, "A"). End (xlUp) .Row Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Pour i = 1 À lastRow Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub c = 2 Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub arr = Split (.Cells (i, 1), "") Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub Pour chaque e In arr Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub .Cell (i, c) .Value = e Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub c = c + 1 Sub name2() Dim e As Variant Dim lastRow As Long Dim c As Integer Dim arr() As Ssortingng c = 2 With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 1 To lastRow c = 2 arr = Split(.Cells(i, 1), " ") For Each e In arr .Cells(i, c).Value = e c = c + 1 Next Next End With End Sub 

entrez la description de l'image ici