.
Upcoming Power Excel Seminars
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: .

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    .

    [ This Message was edited by: Sami on 2002-03-21 21:10 ]

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    hi Sami, just wondering if you are doing A-level computing or ICT?


  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Las Vegas Nevada USA
    Posts
    239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Try this
    Public Sub ByRegion()
    'NOTES IN THIS SUB ARE TYPICAL OF ALL SUBS IN THIS MODULE
    'Erase existing worksheet or chart if present.
    Application.ScreenUpdating = False
    On Error Resume Next
    Application.DisplayAlerts = False
    Sheets("By Region").Delete
    Charts("By Region Chart").Delete
    On Error GoTo 0
    Application.DisplayAlerts = True
    'Select the input sheet and range A2
    Worksheets("INPUT").Select
    Range("A60").Select
    'Create pivot table
    ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
    Range("A60").CurrentRegion.Address).CreatePivotTable TableDestination:="", TableName:= _
    "PivotTable1"
    ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
    ActiveSheet.Cells(3, 1).Select
    ActiveSheet.PivotTables("PivotTable1").SmallGrid = False
    ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="NAME", _
    ColumnFields:="M", PageFields:="REGION"
    ActiveSheet.PivotTables("PivotTable1").PivotFields("AMOUNT").Orientation = _
    xlDataField

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com