bonjour les exceleurs,
voici une macro que j'aimerais modifier elle parle de temps chronométré
'Private Sub cmdEnregistrer_Click()
Dim lig As Long
Dim choixLig As Long
Dim col As Long
Dim choixCol As Long
' Trouver la ligne
choixLig = 0
For lig = 10 To 210
If Range("E10") = 0 Then choixLig = 10: Exit For
If Range("E" & lig) = Range("F1") Then choixLig = lig: Exit For
If Range("E" & lig) = 0 And Range("F6") > 1 Then
lig = Range("E65536").End(xlUp).Row + 1
Cells(lig, 5) = Range("F1")
choixLig = lig: Exit For
End If
Next lig
Cells(choixLig, 5) = Range("F1")
' If choixLig = 0 Then
' MsgBox "L'enregistrement n'est pas possible", vbCritical + vbOKOnly, "Erreur"
' Exit Sub
' End If
' Trouver la colonne
choixCol = 0
For col = 6 To 9
If Cells(choixLig, col) = 0 Then
choixCol = col
Exit For
End If
Next col
If choixCol = 0 Then
MsgBox "L'enregistrement n'est pas possible", vbCritical + vbOKOnly, "Erreur"
Exit Sub
End If
' Afficher le résultat
Cells(choixLig, choixCol).Value = Range("H3").Value
j'aimerais ajouter ceci
if range ("H2") = range ("H1")
' Afficher le résultat
Cells(choixLig, choixCol).Value = neutralisée ( ceci est un texte)
j'espère etre assz clair car je ne peux envoyer le fichier il est trop lourd
Merci
BPOL