¼ÐÃD:
[µo°Ý]
pivot µLªk«ü©w Sheet
[¥´¦L¥»¶]
§@ªÌ:
anny8888
®É¶¡:
2013-10-16 03:52
¼ÐÃD:
pivot µLªk«ü©w Sheet
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-10-16 14:46 ½s¿è
§Q¥Î VBA ¼g PIVOT µLªk«ü©wCREATE ¨ì SHEET 2, ½Ð°Ý¬Oþùئ³°ÝÃD.
·|¤@ª½¥d¦b
Set PT = PTCache.CreatePivotTable _
(TableDestination:=sheets("pivot2").range("A1"), TableName:="PivotTable1")
========================================
Sub crePT()
Dim PTCache As PivotCache
Dim PT As PivotTable
Windows("AA").Activate
'Sheets("Sheet2").Name = "Pivot2"
Set used1 = Sheets("details").UsedRange
Set PTCache = ThisWorkbook.PivotCaches.Add _
(SourceType:=xlDatabase, _
SourceData:=used1)
Set PT = PTCache.CreatePivotTable _
(TableDestination:=sheets("pivot2").range("A1"), TableName:="PivotTable1")
With PT
.PivotFields("Product").Orientation = xlRowField
.PivotFields("account").Orientation = xlRowField
.PivotFields("FSE/FPE").Orientation = xlRowField
.PivotFields("OT").Orientation = xlDataField
End With
Application.CommandBars("PivotTable").Visible = False
End Sub
§@ªÌ:
stillfish00
®É¶¡:
2013-10-16 13:51
¦^´_
1#
anny8888
1. Àˬdused1½d³ò¤º¬O§_¨CÄ溦C³£§t¼ÐÃD¦WºÙ¡C
2. ¼Ï¯Ã¤ÀªRªí¤£¥i«Å|¡AÀˬdsheets("pivot2").range("A1")¬O§_¦³¤w¦s¦b¼Ï¯Ã¤ÀªRªí¡AY¦³»Ý¥ý§R°£¡C
§@ªÌ:
anny8888
®É¶¡:
2013-10-16 14:39
¦^´_
2#
stillfish00
¤w½T»{
1. USED1 ªºº¦C, §¡¦³¸ê®Æ
2.«ü©wªºSHEET¤¤§¹¥þ¨S¦³¸ê®Æ
ÁÂÁÂ.
§@ªÌ:
stillfish00
®É¶¡:
2013-10-16 15:51
¦^´_
3#
anny8888
ªþ¤WÀÉ®×/®×¨Ò¬Ý¬Ý
°õ¦æ®É¬O§_¸ó¤u§@ï?
§@ªÌ:
genes
®É¶¡:
2013-10-17 01:50
¦^´_
1#
anny8888
'Sheets("Sheet2").Name = "Pivot2"³oÓ»¡©ú¤FpÀ³¸Ó¬O¤j·¢P,¤£¬Opivot2
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)