"bigdaddy154
re bonjour ta formule fonctionne , mais quand je passe sur le tableau définitif , ça ne fonctionne pas , pourquoi ?
je suis sur excel 2003
merci pour tout
Sub lignevide() ' recherche la première ligne vide en colonne C
With Sheets("Feuil1")
Set plage = Range("c8:c83" & Cells(Rows.Count, 1).End(xlUp).Row)
plage.SpecialCells(xlCellTypeBlanks).Cells(1, 1).Select
End With
recherchecells ' passe sur la Macro suivante
End Sub
Sub recherchecells()
Range("c5").ClearContents
Range("f5").ClearContents
dlf = Range("c" & Rows.Count).End(xlUp).Row
For I = 8 To dlf
If Range("c" & I) = "" Then' ' ça ne fonctionne pas erreur 2042 ???
If Range("f10") = "" Then
Range("c5") = Range("c" & I - 2)
Range("f5") = Range("d" & I - 2)
End If
Exit Sub
End If
Next I
Range("A1").Select
End Sub