1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| Sub ConditionsCelluleSUP()
'
Dim NbLigne As Integer
Dim i As Integer
'
NbLigne = Cells(1, 1).CurrentRegion.Rows.Count
Cells(2, 15).Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-5]=""Récupéré sur Site"",""Préciser le code IG du site où a été récupéré le module"",IF(RC[-5]=""Déposé en pied de site"",""Préciser le code IG du site où a été mis le module"",IF(RC[-5]=""Matériel installé"",""Préciser le code IG où a été installé le module"",IF(RC[-5]=""Transféré à un autre technicien"",""Préciser le nom du technicien"",IF(RC[-5]=""Autres"",""Merci de préciser"","""")))))"
'
Selection.FormatConditions.Add Type:=xlTextString, String:= _
"=""Préciser le code IG du site où a été récupéré le module""", TextOperator:=xlContains
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
'
Selection.FormatConditions.Add Type:=xlTextString, String:= _
"=""Préciser le code IG du site où a été mis le module""", TextOperator:=xlContains
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
'
Selection.FormatConditions.Add Type:=xlTextString, String:= _
"=""Préciser le code IG où a été installé le module""", TextOperator:=xlContains
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
'
Selection.FormatConditions.Add Type:=xlTextString, String:= _
"=""Préciser le nom du technicien""", TextOperator:=xlContains
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
'
Selection.FormatConditions.Add Type:=xlTextString, String:= _
"=""Merci de préciser""", TextOperator:=xlContains
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
'
Range("S2").Select
Selection.Copy
Range(Cells(3, 19), Cells(NbLigne, 19)).Select
ActiveSheet.Paste
'
End Sub |
Partager