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
|
Sub crea_recherche2() 'Mise en forme ligne
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim i As Double
Dim post As Double
Dim derlign As Double
Dim test As Variant
Sheets("travail").Activate 'onglet travail actif
derlign = Range("A" & Rows.Count).End(xlUp).Row 'dernière ligne colonne A
For post = 13 To derlign 'Post= ligne 13 à dernière ligne
If Range("F" & post) = "" Then 'Si colonne G vide
'Sélection Colonne A à G
With Range("A" & post, "G" & post)
.HorizontalAlignment = xlCenter 'centrage texte
.VerticalAlignment = xlBottom
End With
With Range("A" & post, "G" & post).Interior
.ThemeColor = xlThemeColorLight2 'Fond de couleur
.TintAndShade = 0.399975585192419
End With
With Range("A" & post, "G" & post).Font 'Police Arial ...
.Name = "Arial"
.Size = 11
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("A" & post, "G" & post).Font.Bold = True 'Gras
Range("A" & post, "G" & post).Merge
With Range("A" & post, "G" & post).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Range("A" & post, "G" & post).Borders(xlEdgeTop) 'Bordure
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Range("A" & post, "G" & post).Borders(xlEdgeBottom) 'Bordure
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Range("A" & post, "G" & post).Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
End If
Next post
Sheets("travail").Activate
Application.ScreenUpdating = True 'Mise à jour travail
Application.DisplayAlerts = True
End Sub |
Partager