Bonjour Myta et le forum
Un grand merci Myta de ta passience et persévérence,
Voici je désire faire des bordure effet 2 dimenssions
la formule suivanmte =MOD(Colonne();2) semble la plus appropié
Or j'essais de compredre la macro suivante
Sub Format_Tableau()
Dim X As Integer
Application.ScreenUpdating = False
For X = 1 To 100 Step 2
With Cells(X, X)
.RowHeight = 3
.ColumnWidth = 0.67
End With
Next X
With Range("B2").Borders
.LineStyle = xlDouble
.Weight = xlThick
End With
Range("A1:B2").AutoFill Destination:=Range(Cells(1, 1), Cells(100, 2)), Type:=xlFillDefault
Range("A1:B100").AutoFill Destination:=Range(Cells(1, 1), Cells(100, 100)), Type:=xlFillDefault
Application.ScreenUpdating = True
End Sub
car celle ci est très longue mais résultat recherché
Range("A2:Z100").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(LIGNE();2)=0"
Selection.FormatConditions(1).Font.ColorIndex = 11
With Selection.FormatConditions(1).Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 2
End With
With Selection.FormatConditions(1).Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
With Selection.FormatConditions(1).Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 2
End With
With Selection.FormatConditions(1).Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
Selection.FormatConditions(1).Interior.ColorIndex = 15
Range("A:A,C:C,E:E,G:G,I:I,K:K,M:M,O:O,Q:Q,S:S,U:U,W:W,Y:Y").Select
Range("K1").Activate
Selection.FormatConditions.Delete
Range("A2").Select
Maintenant quel est la macro la plus simple pour parvenire au résultat au colonne impaire avec bordure et espasser d'une ligne
Merci de votre passience
Au plaisir de vous relire
André