cool hit counter VBA Pivot Table_Intefrankly

VBA Pivot Table


ActiveWorkbook.PivotCaches.Create( _
    SourceType:=xlDatabase, _
    SourceData:=sh & "!R1C1:R" & rn & "C22", _
    Version:=4 _
    ).CreatePivotTable _
    TableDestination:="Sheet1!R1C1", _
    TableName:="pivot table1", _
    DefaultVersion:=4
    'xlPivotTableVersion10=1(03)11=2()12=3()14=4(2010)~15=5(2013)6(2016)
    ' You must have the table active to manipulate the pivot table in the table
With ActiveSheet.PivotTables("pivot table1")
    ' Report layout settings
    .RowAxisLayout xlTabularRow 'xlTabularRow form,xlOutlineRow syllabus,xlCompactRow compressed( default)
    .RepeatAllLabels xlRepeatLabels 'xlRepeatLabels repeatable,xlDoNotRepeatLabels non-repetitive( default)
    ' aggregate
    .ColumnGrand = False '.ColumnGrand columns.RowGrand go' All enabled by defaultTrue
    
    ' Row Filter Category Summary Field
    pf = Array(" types", " Name of picker", " logical area code", " Task pick-up time")
    For Each pfi In pf
    With .PivotFields(pfi)
        .Orientation = xlRowField
        .Subtotals = Array(False, False, False, False, False, False, False, False, False, False, False, False)
    End With
    Next
    
    '.Orientation = xlRowField / xlColumnField / xlPageField
    '.Position = 1 ' Insert Position
    '. Classification Summary = Array ( automate, summation (math), reckoning, average value, maximum value, minimum value, product (result of multiplication), Numerical counting, standard deviation, Overall standard deviation, variance (statistics), Overall variance)
    '.Subtotals = Array(Atuo,Sum,Count,Average,Max,Min,Product,Count Nums,StdDev,StdDevp,Var,Varp)
    '.SubtotalLocation xlAtTop ' Category Summary LocationxlAtTop topmost part,xlAtBottom underside( default)
    
    ' Value fields and formats
    .AddDataField .PivotFields(" Picking completion time"), " Final picking completion time", xlMax
    .PivotFields(" Final picking completion time").NumberFormat = "yyyy/m/d h:mm:ss"
    .AddDataField .PivotFields(" Actual picking volume"), " go", xlCount
    .AddDataField .PivotFields(" Actual picking volume"), " item", xlSum
    
    ' full-pick pivot table
    .PivotSelect "", xlDataAndLabel, True
    'PivotSelect  targets, mode,[ Allow macros]
    ' mode:xlBlanks/xlButton/xlDataOnly/xlFirstRow/xlLabelOnly/xlOrigin/xlDataAndLabel( Default but required)
End With

Recommended>>
1、python crawler series of html page parsing how to write xpath path
2、Master these questions to become a Facebook machine learning engineer
3、ECshop quick login plugin supports QQ Alipay microblogging
4、SpringMVC Notes
5、InfoGAN GAN Training Instability Factor Analysis

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号