Můžete zaregistrovat na jednu sekundu na tomto webu http://www.ozgrid.com/forum/showthread.php?t=58206&highlight=Dynamic+Chart a stáhněte
DynaChart.xls.
Uplatnit Group Outline Columns je možna po -
Sub Macro2()
Dim Sel As Range, cell As Range, n As Byte
Application.ScreenUpdating = False
Set Sel = Selection
If Sel.Rows.Count = 1 Then
For Each cell In Sel
If cell Like ("[1-8]") Then n = cell Else n = 1
cell.EntireColumn.OutlineLevel = n
Next
ElseIf Sel.Columns.Count = 1 Then
For Each cell In Sel
If cell Like ("[1-8]") Then n = cell Else n = 1
cell.EntireRow.OutlineLevel = n
Next
Else
MsgBox "?"
End If
Application.ScreenUpdating = True
End Sub
'Definovat dynamický rozsah proměnných
Dim oUpBound As Range
Dim oLowBound As Range
Dim oFillRange As Range
Dim oChart As ChartObject
Sheets("DataSource").Select
Set oUpBound = Range("C11")
oUpBound.Select
Selection.Offset.End(xlToRight).Select
Selection.Offset.End(xlDown).Select
Set oLowBound = Selection
Set oFillRange = Range(oUpBound, oLowBound)
'Nastavení grafu SourceData
With oChart
.Chart.SetSourceData Source:=Sheets("DataSource").Range(oFillRange), PlotBy:=xlColumns
End With
Žádost kritériem pro filtr
Set wSheetStart = ActiveSheet
Set rFilterHeads = Range("L1", Range("IV1").End(xlToLeft))
With wSheetStart
.AutoFilterMode = False
rFilterHeads.AutoFilter
strCriteria = InputBox("Zadejte kritéria")
If strCriteria = vbNullString Then Exit Sub
rFilterHeads.AutoFilter Field:=3, Criteria1:=strCriteria
End With
nebo
Sub AutoFilter_Begins_With()
Range("A1").AutoFilter Field:=1, Criteria1:="Zadejte kritéria zde*"
End Sub
Kdýž chcete, výsledný kod zkombinujete sami
citovat