Sub MAJ_Tableau()
Dim P As Range, tablo
Application.ScreenUpdating = False
With Sheets("Suivi compte")
Set P = .ListObjects(1).Range 'tableau structuré
tablo = P 'mémorise les valeurs
.Cells.Clear 'efface toute la feuille
P = tablo 'restitue les valeurs
With .ListObjects.Add(xlSrcRange, P, , xlYes) 'recrée le tableau structuré
.TableStyle = "TableStyleMedium8"
With .Range.Rows(2).Resize(.ListRows.Count)
.Columns(1).Validation.Add xlValidateList, Formula1:="=INDIRECT(""Symboles"")"
.Columns(7).Validation.Add xlValidateList, Formula1:="A,V"
.Columns(10).FormulaR1C1 = "=IF(RC[-2]<>"""",RC[-2]+N(R[-1]C),"""")"
Union(.Columns(8), .Columns(10)).NumberFormat = "0.00;[Red]-0.00"
End With
End With
Union(P.Columns(3).Resize(, 2), P.Columns(7)).HorizontalAlignment = xlCenter
P.Columns.AutoFit 'ajustement largeurs
With .UsedRange: End With 'actualise les barres de défilement
End With
End Sub