ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] excel 2007 ¿ý»sªº¼Ï¯Ã¦b2003µLªk¨Ï¥Î

[µo°Ý] excel 2007 ¿ý»sªº¼Ï¯Ã¦b2003µLªk¨Ï¥Î

½Ð±Ð¦U¦ì¥ý¶i

  ¤p§Ì§Ú¦b2007¿ý»sªº¼Ï¯Ã¤ÀªR¡A¦b2003¦~µLªk¨Ï¥Î

½Ð°Ý¬O­þ¸Ì¦³°ÝÃD©O¡H¡H

------------------------------------------------------------------------------------------------------------

            Rows("1:1").Select
    Selection.Delete Shift:=xlUp
    Columns("C:D").Select
    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
        "¾ã²z!R1C3:R65536C4", Version:=xlPivotTableVersion10).CreatePivotTable _
        TableDestination:="¾ã²z!R2C9", TableName:="¼Ï¯Ã¤ÀªRªí1", DefaultVersion:= _
        xlPivotTableVersion10
    Sheets("¾ã²z").Select
    Cells(2, 9).Select
    ActiveWorkbook.ShowPivotTableFieldList = True
    With ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1").PivotFields("®Æ¸¹+§å¸¹")
        .Orientation = xlRowField
        .Position = 1
    End With
   
    ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1").AddDataField ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1" _
        ).PivotFields("¼Æ¶q"), "­p¼Æ - ¼Æ¶q", xlCount
    ActiveWorkbook.ShowPivotTableFieldList = False
    Columns("I:J").Select
    Selection.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    Sheets("Âà´«").Select
    ActiveWindow.SmallScroll Down:=-9
    Range("A1").Select
    ActiveSheet.Paste
    Sheets("¾ã²z").Select
    Range("J4").Select

    Range("J4:J19864").Select
    Application.CutCopyMode = False
    With ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1").PivotFields("­p¼Æ - ¼Æ¶q")
        .Caption = "¥[Á` - ¼Æ¶q"
        .Function = xlSum
    End With

------------------------------------------------------------------------------------------------------------
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

pivot table¸ÌªºªFªF¬O¤£¦Pªº

TOP

¦^´_ 2# genes


    ½Ð°Ý¤j¤j³o¸Ó¦p¦ó¸Ñ¨M©O¡H
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 3# dragonbx

®a¤¤¥u¦³2003,­n¦^¨ì¤½¥q¤~¥i¥Î2007¶i¦æ´ú¸Õ

TOP

¸Õ¤U­±
           Rows("1:1").Select
    Selection.Delete Shift:=xlUp
    Columns("C").Select
    ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
        "¾ã²z!R1C3:R65536C4").CreatePivotTable _
        TableDestination:="¾ã²z!R2C9", TableName:="¼Ï¯Ã¤ÀªRªí1", DefaultVersion:= _
        xlPivotTableVersion10
    Sheets("¾ã²z").Select
    Cells(2, 9).Select
    ActiveWorkbook.ShowPivotTableFieldList = True
    With ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1").PivotFields("®Æ¸¹+§å¸¹")
        .Orientation = xlRowField
        .Position = 1
    End With
   
    ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1").AddDataField ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1" _
        ).PivotFields("¼Æ¶q"), "­p¼Æ - ¼Æ¶q", xlCount
    ActiveWorkbook.ShowPivotTableFieldList = False
    Columns("I:J").Select
    Selection.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    Sheets("Âà´«").Select
    ActiveWindow.SmallScroll Down:=-9
    Range("A1").Select
    ActiveSheet.Paste
    Sheets("¾ã²z").Select
    Range("J4").Select

    Range("J4:J19864").Select
    Application.CutCopyMode = False
    With ActiveSheet.PivotTables("¼Ï¯Ã¤ÀªRªí1").PivotFields("­p¼Æ - ¼Æ¶q")
        .Caption = "¥[Á` - ¼Æ¶q"
        .Function = xlSum
    End With

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD