Sub Mise_à_jour()
'ATTENTION Formule : si RdV déjà : RdV Fait Facturé
[o2] = "=COUNTIF(R[3]C:R[9996]C,""><"")"
[M4] = "=IF(SUM(--(ISNUMBER(SEARCH(RC[-11],Facture!R2C[-8]:R30C[-8]))))>=1,RC[-11],"""")"
'ME RENVOIE EN M4 : =SI(SOMME(--(ESTNUM(CHERCHE(B4;@Facture!E$2:E$30))))>=1;B4;"")
'----------------------------------------------------------------------------------------
'Remplace le @
[O4] = "SI(SOMME(--(ESTNUM(CHERCHE(B4;@Facture!E$2:E$30))))>=1;B4;"""")"
[O4].Select
ActiveCell.Replace What:="@", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Cells.Find(What:="@", After:=ActiveCell, LookIn:=xlFormulas2, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Range("M4").Select
ActiveCell.Formula2R1C1 = _
"=IF(SUM(--(ISNUMBER(SEARCH(RC[-11],Facture!R2C[-8]:R30C[-8]))))>=1,RC[-11],"""")"
Range("O4").ClearContents
'----------------------------------------------------------------------------------------
[M4].Copy
[m5:m13].Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
[J4] = "=IF(RC[3]<>"""",""RdV Fait Facturé"",""RdV Fait"")"
[J4].Copy
[J5:J13].Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("J4:J13").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Columns("m:q").Select
Application.CutCopyMode = False
'Selection.ClearContents
Range("A1").Select
End Sub