Sheets("Feuil1").Cells(j, 1) = Trim(Sheets("Feuil1").Cells(j, 1))
Re,re
excel 2007 n'a pas les protections que 2013 a
il y a une cochonnerie qui ne devrait pas y être dans ton fichier ça c'est sur !!
Sub Trier_Chevaux()
Dim j As Integer
Dim i As Integer
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'Range("A2") = Date + 1
Range("A2") = Range("A2") + 1
Range("plage1").ClearContents
'For j = 1 To 180 Step 3
For j = 1 To 300
If Sheets("Feuil1").Cells(j, 1) <> "" Then
For i = 6 To 52
If Sheets("Feuil1").Cells(j, 1) = Sheets("PRESSES").Cells(i, 1) Then
Sheets("PRESSES").Cells(i, 4) = Sheets("Feuil1").Cells(j, 2)
Sheets("PRESSES").Cells(i, 5) = Sheets("Feuil1").Cells(j, 3)
Sheets("PRESSES").Cells(i, 6) = Sheets("Feuil1").Cells(j, 4)
Sheets("PRESSES").Cells(i, 7) = Sheets("Feuil1").Cells(j, 5)
Sheets("PRESSES").Cells(i, 8) = Sheets("Feuil1").Cells(j, 6)
Sheets("PRESSES").Cells(i, 9) = Sheets("Feuil1").Cells(j, 7)
Sheets("PRESSES").Cells(i, 10) = Sheets("Feuil1").Cells(j, 8)
Sheets("PRESSES").Cells(i, 11) = Sheets("Feuil1").Cells(j, 9)
Exit For
End If
Next i
End If
Next j
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Sub Trier_Chevaux_BON()
Dim j As Integer
Dim i As Integer
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Range("A2") = Range("A2") + 1
Range("plage1").ClearContents
For j = 1 To 300
Sheets("Feuil1").Cells(j, 1) = Trim(Sheets("Feuil1").Cells(j, 1))
If Sheets("Feuil1").Cells(j, 1) <> "" Then
For i = 6 To 52
If Sheets("Feuil1").Cells(j, 1) = Sheets("PRESSES").Cells(i, 1) Then
Sheets("PRESSES").Cells(i, 4) = Sheets("Feuil1").Cells(j, 2)
Sheets("PRESSES").Cells(i, 5) = Sheets("Feuil1").Cells(j, 3)
Sheets("PRESSES").Cells(i, 6) = Sheets("Feuil1").Cells(j, 4)
Sheets("PRESSES").Cells(i, 7) = Sheets("Feuil1").Cells(j, 5)
Sheets("PRESSES").Cells(i, 8) = Sheets("Feuil1").Cells(j, 6)
Sheets("PRESSES").Cells(i, 9) = Sheets("Feuil1").Cells(j, 7)
Sheets("PRESSES").Cells(i, 10) = Sheets("Feuil1").Cells(j, 8)
Sheets("PRESSES").Cells(i, 11) = Sheets("Feuil1").Cells(j, 9)
Exit For
End If
Next i
End If
Next j
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Re,Bonsoir JBarbe, Patricktoulon,
Quand on copie colle des données d'un site vers XL, généralement on colle aussi des caractères "parasites", comme le fameux CHR(160).
Ca ne pose pas de problème mais il semble qu'au delà de XL2007, XL regarde aussi les caractères qui lui semble bizarres, par sécurité.
Ce n'est pas un problème, juste une alerte de sécurité.