Question

create summary table

Asked by: LINNANDA

Hi,

I've an excel spreadsheet with


client name   client type value_a value_b value_c

on a sheet called detailed

I've to create a summary sheet with

                  count                 average             median                     std dev
value_a    count_a               average_a       median_a                  stdev_a
value_b    count_b             average_b          median_b                  stdev_b
value_c     count_c              average_c          median_c                  stdev_c
total

where count_a  =COUNT('Detailed'!D3:D163)
            count_b  =COUNT('Detailed'!E3:E163)
            count_C  =COUNT('Detailed'!F3:F163)

            average_a =AVERAGE('Detailed'!D3:D163)
            average_B =AVERAGE('Detailed'!E3:E163)
            average_c =AVERAGE('Detailed'!f3:f163)

          median_a =MEDIAN('Detailed'!D3:D163)
          median_B =MEDIAN('Detailed'!E3:E163)
           median_c =MEDIAN('Detailed'!f3:f163)

       std dev_a  =STDEV('Detailed '!D3:D163)
        std dev_B   =STDEV('Detailed '!E3:E163)

and so on
any ideas how I would write a macro to do this automatically

Any help would be much appreciated.

Regards,



 

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-10-16 at 09:04:24ID22896573
Tags

summary

,

table

,

create

Topic

VB Script

Participating Experts
3
Points
0
Comments
5

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Weekly summary
    Hi experts, I would like to get a formula that summarizes door counts by week number. My data layout is like this: Daily Door Counts Jan Feb ..... Mar, Apr, ....Dec. date Door Date Door 01/01/04 ...
  2. =IF(D3<E3,"E3","D3") Change E3 and D3 to …
    Hi I have an IF statement: =IF(D3<E3,"E3","D3") It works correctly (for a change!), but rather than display 'E3' and 'D3', I would like it to display the information in that cell. Effectively having =E3 and =D3 writtern to the cell, I have tried this...
  3. Macro for doing totals & sub totals in a spreadsheet
    Hi, I have a huge spreadsheet which columns added every quarter. As new data gets added, I need macros to workout sub totals and totals. In the sheet attached, the Q4 data was added, so the macro should give sub total for each company for Q4 and then the grand totals. Please...
  4. Macro to prepare a summary spreadsheet
    This is just an exploratory question. I will send details in another question. Each week I receive Excel files from several people. Each file contains data in a standard format starting from row 6 in the files second tab called "AO Tracker". I then do a manual p...
  5. Macro to copy data into master summary worksheet
    see attached workbook Hi experts Need a macro that will copy all the data in all the worksheet(s) EXCEPT worksheet "Task_Table1". So starting with worksheet Europe, Asia, NA, Latin America and so until Shared Assets worksheet. Need to copy any data if present fro...
  6. Excel 2003- Combine 7 spreadsheets inton one Summ…
    I have 7 spreadsheets titled: 1hours 2hours 3hours 4hours .... 7hours All spreadsheets have the same column headers :( 10 Columns total). I would like to combine all the data into one spreadsheet (Call it "Summary") so I can pivot-analyze the data. I tried combini...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: aavictorPosted on 2007-10-16 at 09:24:52ID: 20086853

Missing size of matrix
population / sample size = countif(Detailed!B3:Detailed!B100000)

 

by: Kelvin81Posted on 2007-10-16 at 21:47:00ID: 20090879

I don't think you need a macro.  I would try using a pivot table first.
Is there a reason that wouldn't work?

Pivot tables can sum/average/multiply/count all items for you.

Regards,
Kelvin

 

by: LINNANDAPosted on 2007-10-17 at 08:04:28ID: 20094140

sorted use dthe following and it worked fine:

Sub Format_Sheet()
'
' Macro5 Macro
' Macro recorded 26/05/2005 by linnanda
'

Dim myfile1 As String
Dim myfile2 As String
Dim myPath As String
Dim myname As String


myPath = "U:\transfer\a\Performance\"
myname = Dir(myPath, vbNormal)   ' Retrieve the first entry.
Do While myname <> ""   ' Start the loop.

      If (GetAttr(myPath & myname) And vbNormal) = vbNormal Then

   
   
    Workbooks.Open Filename:=myPath & myname

 ActiveSheet.Name = "Detailed"


  Sheets.Add




    Sheets("Sheet1").Select
    Cells.Select
    With Selection.Interior
        .ColorIndex = 2
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
    Range("A2").Select
    ActiveCell.FormulaR1C1 = "Portfolio Manager:"
    Range("A3").Select
    ActiveCell.FormulaR1C1 = "Summary Performance by Client Type and Model"
    Range("A4").Select
    ActiveCell.FormulaR1C1 = "Quarter 3 2007"
    Range("A2:A4").Select
    Selection.Font.Bold = True
    Range("A6:G6").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    With Selection.Interior
        .ColorIndex = 15
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
    Range("D6").Select
    ActiveCell.FormulaR1C1 = "All Clients"
    Range("D6").Select
    Selection.Font.Bold = True
    Range("B7").Select
    ActiveCell.FormulaR1C1 = "Model Portfolio"
    Range("B7").Select
    Selection.Font.Bold = True
    Range("A2:A4").Select
    Range("A4").Activate
    With Selection.Font
        .Name = "Arial"
        .Size = 12
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
    Range("C7").Select
    ActiveCell.FormulaR1C1 = "No. Clients"
    Range("D7").Select
    ActiveCell.FormulaR1C1 = "Perf Mean(%)"
    Range("E7").Select
    ActiveCell.FormulaR1C1 = "Perf Median(%)"
    Range("F7").Select
    ActiveCell.FormulaR1C1 = "Perf Std Dev"
    Range("G6").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    Selection.Borders(xlEdgeBottom).LineStyle = xlNone
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    With Selection.Interior
        .ColorIndex = 2
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
    Columns("B:F").Select
    Columns("B:F").EntireColumn.AutoFit
    Range("B8").Select
    ActiveCell.FormulaR1C1 = "Not defined"
    Range("B9").Select
    ActiveCell.FormulaR1C1 = "Capital Preservation"
    Range("B10").Select
    ActiveCell.FormulaR1C1 = "Current Income"
    Range("B11").Select
    ActiveCell.FormulaR1C1 = "Income + Growth"
    Range("B12").Select
    ActiveCell.FormulaR1C1 = "Long Term Growth"
    Range("B13").Select
    ActiveCell.FormulaR1C1 = "Capital Appreciation"
    Range("B14").Select
    ActiveCell.FormulaR1C1 = "Aggressive"
    Range("B15").Select
    ActiveCell.FormulaR1C1 = "No Predefined Benchmark"
    Range("B16").Select
    Columns("B:B").EntireColumn.AutoFit
    ActiveCell.FormulaR1C1 = "Total"
    Range("B16").Select
    With Selection
        .HorizontalAlignment = xlRight
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .ShrinkToFit = False
        .MergeCells = False
    End With
    ActiveCell.FormulaR1C1 = "   Total"
    Range("A6:F16").Select
    Range("A16").Activate
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Range("G25").Select
    Columns("C:C").ColumnWidth = 18.71
    Columns("C:C").ColumnWidth = 14.14
    Columns("D:D").ColumnWidth = 16.57
    Columns("E:E").ColumnWidth = 20
    Columns("F:F").ColumnWidth = 19.71
    ActiveWindow.Zoom = 75
    Range("B16").Select
    Selection.Font.Bold = True
    Range("A18:F18").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    With Selection.Interior
        .ColorIndex = 15
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
    Range("D18").Select
    ActiveCell.FormulaR1C1 = "Discretionary"
    Range("D18").Select
    Selection.Font.Bold = True
    Range("B19").Select
    ActiveCell.FormulaR1C1 = "Model Portfolio"
    Range("B8").Select
    ActiveCell.FormulaR1C1 = "Not Defined"
    Range("B20").Select
    ActiveCell.FormulaR1C1 = "Not Defined"
    Range("B9:B16").Select
    Selection.Copy
    Range("B21").Select
    ActiveSheet.Paste
    Range("C7:F7").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("C19").Select
    ActiveSheet.Paste
    Range("B19").Select
    Selection.Font.Bold = True
    Range("A18:F28").Select
    Range("A28").Activate
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Range("A18:F28").Select
    Selection.Copy
    Range("A30").Select
    ActiveSheet.Paste
    Range("D30").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "Advisory"
    Range("A30:F40").Select
    Range("A40").Activate
    Selection.Copy
    ActiveWindow.SmallScroll Down:=10
    Range("A42").Select
    ActiveSheet.Paste
    Range("D42").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "Execution"
    Range("C43:F43").Select
    Selection.Font.Bold = True
    Range("C31:F31").Select
    Selection.Font.Bold = True
    Range("C19:F19").Select
    Selection.Font.Bold = True
    ActiveWindow.ScrollRow = 1
    Range("C7:F7").Select
    Selection.Font.Bold = True
    Range("F7").Select
    ActiveCell.FormulaR1C1 = "Perf Std Dev (%)"
    Range("F19").Select
    ActiveCell.FormulaR1C1 = "Perf Std Dev"
    Range("F7").Select
    Selection.Copy
    Range("F19").Select
    ActiveSheet.Paste
    Range("F31").Select
    ActiveSheet.Paste
    Range("A2").Select
   
     ActiveSheet.Name = "Summary"

'part 2

 Range("A2").Select

    Range("C8").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[4])"
    Range("C9").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[5])"
    Range("C10").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[6])"
    Range("C11").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[7])"
    Range("C12").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[8])"
    Range("C13").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[9])"
    Range("C14").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[10])"
    Range("C15").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[11])"
    Range("C16").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[4]:C[11])"
    Range("D8").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[3])"
    Range("D9").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[4])"
    Range("D10").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[5])"
    Range("D11").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[6])"
    Range("D12").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[7])"
    Range("D13").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[8])"
    Range("D14").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[9])"
    Range("D15").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[10])"
    Range("E8").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[2])"
    Range("E9").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[3])"
    Range("E10").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[4])"
    Range("E11").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[5])"
    Range("E12").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[6])"
    Range("E13").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[7])"
    Range("E14").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[8])"
    Range("E15").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[9])"
    Range("F8").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[1])"
    Range("F9").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[2])"
    Range("F10").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[3])"
    Range("F11").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[4])"
    Range("F12").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[5])"
    Range("F13").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[6])"
    Range("F14").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[7])"
    Range("F15").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[8])"
    Range("D16").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Detailed!C[3]:C[10])"
    Range("E16").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Detailed!C[2]:C[9])"
    Range("F16").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Detailed!C[1]:C[8])"
    Range("C8:F16").Select
    Range("C16").Activate
    Selection.NumberFormat = "#,##0;(#,##0)"
    Range("C8:F16").Select
    Range("C16").Activate
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .ShrinkToFit = False
        .MergeCells = False
    End With
    Range("A1").Select



    Sheets("Detailed").Select
    Rows("1:1").Select
    Selection.AutoFilter
    Selection.AutoFilter Field:=5, Criteria1:="A"
    Selection.AutoFilter Field:=5, Criteria1:="D"
    Sheets("Summary").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Detailed!C[4])"
    Range("C21").Select
    Sheets("Summary").Select
    Range("C20").Select
    Sheets("Detailed").Select
    Cells.Select
    Selection.Copy
    Sheets("Detailed").Select
    Sheets.Add
    ActiveSheet.Paste
    Range("E7").Select
    Sheets("Detailed").Select
    Selection.AutoFilter Field:=5, Criteria1:="A"
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Detailed").Select
    Sheets.Add
    ActiveSheet.Paste
    Sheets("Detailed").Select
    Selection.AutoFilter Field:=5, Criteria1:="E"
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Detailed").Select
    Sheets.Add
    ActiveSheet.Paste
    Range("D4").Select
    Sheets("Summary").Select
    Application.CutCopyMode = False
    Selection.ClearContents
    Range("C20").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[4])"
    Range("C21").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[5])"
    Range("C22").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[6])"
    Range("C23").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[7])"
    Range("C24").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[8])"
    Range("C25").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[9])"
    Range("C26").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[10])"
    Range("C27").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[11])"
    Range("D20").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[3])"
    Range("D21").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[4])"
    Range("D22").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[5])"
    Range("D23").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[6])"
    Range("D24").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[7])"
    Range("D25").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[8])"
    Range("D26").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[9])"
    Range("D27").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[10])"
    Range("E20").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[2])"
    Range("E21").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[3])"
    Range("E22").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[4])"
    Range("E23").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[5])"
    Range("E24").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[6])"
    Range("E25").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[7])"
    Range("E26").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[8])"
    Range("E27").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[9])"
    Range("F20").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[1])"
    Range("F21").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[2])"
    Range("F22").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[3])"
    Range("F23").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[4])"
    Range("F24").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[5])"
    Range("F25").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[6])"
    Range("F26").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[7])"
    Range("F27").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[8])"
    Range("C28").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet2!C[4]:C[11])"
    Range("D28").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet2!C[3]:C[10])"
    Range("E28").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet2!C[2]:C[9])"
    Range("F28").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet2!C[1]:C[8])"
    Range("C20:F28").Select
    Range("C28").Activate
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .ShrinkToFit = False
        .MergeCells = False
    End With
    Selection.NumberFormat = "#,##0;(#,##0)"
    Range("F26").Select
    ActiveWindow.SmallScroll Down:=17
    Range("C32").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[4])"
    Range("C33").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[5])"
    Range("C34").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[6])"
    Range("C35").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[7])"
    Range("C36").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[8])"
    Range("C37").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[9])"
    Range("C38").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[10])"
    Range("C39").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[11])"
    Range("C32").Select
    Sheets("Summary").Select
    Range("D32").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[3])"
    Range("D33").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[4])"
    Range("D34").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[5])"
    Range("D35").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[6])"
    Range("D36").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[7])"
    Range("D37").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[8])"
    Range("D38").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[9])"
    Range("D39").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[10])"
    Range("E32").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[2])"
    Range("E33").Select
    ActiveCell.FormulaR1C1 = ""
    Range("E33").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[3])"
    Range("E34").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[4])"
    Range("E35").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[5])"
    Range("E36").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[6])"
    Range("E37").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[7])"
    Range("E38").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[7])"
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[8])"
    Range("E39").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[9])"
    Range("F32").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[1])"
    Range("F33").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[2])"
    Range("F32").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[1])"
    Range("F32").Select
    Selection.ClearContents
    Range("F33").Select
    Selection.ClearContents
    Range("F32").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[1])"
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[1])"
    Range("F33").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[2])"
    Range("F34").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[3])"
    Range("F35").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[4])"
    Range("F36").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[5])"
    Range("F37").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[6])"
    Range("F38").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[7])"
    Range("F39").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[8])"
    Range("C40").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet3!C[4]:C[11])"
    Range("D40").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(R[-1]C)"
    ActiveCell.FormulaR1C1 = ""
    Range("D40").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet3!C[3]:C[10])"
    Range("E40").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet3!C[2]:C[10])"
    Range("F40").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet3!C[1]:C[8])"
    Range("C32:F40").Select
    Range("C40").Activate
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .ShrinkToFit = False
        .MergeCells = False
    End With
    Selection.NumberFormat = "#,##0;(#,##0)"
    Range("C44").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-42]C[4]:R[-27]C[4])"
    Range("C45").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-43]C[5]:R[-28]C[5])"
    Range("C46").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-44]C[7]:R[-29]C[7])"
    Range("C47").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-45]C[7]:R[-30]C[7])"
    Range("C48").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-46]C[8]:R[-31]C[8])"
    Range("C49").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-47]C[9]:R[-32]C[9])"
    ActiveWindow.SmallScroll Down:=3
    Range("C50").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-48]C[10]:R[-33]C[10])"
    Range("C51").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!R[-49]C[11]:R[-34]C[11])"
    Range("D44").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-42]C[3]:R[-27]C[3])"
    Range("D45").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-43]C[5]:R[-28]C[5])"
    Range("D45").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-43]C[4]:R[-27]C[4])"
    Range("D46").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-44]C[5]:R[-29]C[5])"
    Range("D47").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-45]C[6]:R[-30]C[6])"
    Range("D48").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-46]C[7]:R[-31]C[7])"
    Range("D49").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-47]C[8]:R[-32]C[8])"
    Range("D50").Select
    Sheets("Sheet3").Select
    Range("M2:M17").Select
    Range("M17").Activate
    Sheets("Summary").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-48]C[9]:R[-33]C[9])"
    Range("D51").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!R[-49]C[10]:R[-34]C[10])"
    Range("E44").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!R[-42]C[2]:R[-27]C[2])"
    Range("E45").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!R[-43]C[3]:R[-28]C[3])"
    Range("E46").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!R[-44]C[4]:R[-29]C[4])"
    Range("E47").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!R[-45]C[5]:R[-30]C[5])"
    Range("E48").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!R[-46]C[6]:R[-31]C[6])"
    Range("E49").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[7])"
    Range("E50").Select
    ActiveCell.FormulaR1C1 = ""
    Range("E50").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[8])"
    Range("E51").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[9])"
    Range("E48").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[6])"
    Range("E47").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[5])"
    Range("E46").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[4])"
    Range("E45").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[3])"
    Range("E44").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[2])"
    Range("D44").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[3])"
    Range("D45").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[4])"
    Range("D46").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[5])"
    Range("D47").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[6])"
    Range("D48").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[7])"
    Range("D49").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[8])"
    Range("D50").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[9])"
    Range("D51").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[10])"
    Range("C44").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[4])"
    Range("C45").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[5])"
    Range("C46").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[7])"
    Range("C47").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[7])"
    Range("C48").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[8])"
    Range("C49").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[9])"
    Range("C50").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[10])"
    Range("C51").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[11])"
    Range("F44").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[1])"
    Range("F45").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[2])"
    Range("F46").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[3])"
    Range("F47").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[3])"
    Range("F47").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[4])"
    Range("F48").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[5])"
    Range("F49").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[6])"
    Range("F50").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[7])"
    Range("F51").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[8])"
    Range("C52").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[4]:C[11])"
    Range("D52").Select
    ActiveCell.FormulaR1C1 = "=AVERAGE(Sheet4!C[3]:C[10])"
    Range("E52").Select
    ActiveCell.FormulaR1C1 = "=MEDIAN(Sheet4!C[2]:C[9])"
    Range("F52").Select
    ActiveCell.FormulaR1C1 = "=STDEV(Sheet4!C[1]:C[8])"
    Range("C44:F52").Select
    Range("C52").Activate
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .ShrinkToFit = False
        .MergeCells = False
    End With
    Selection.NumberFormat = "#,##0;(#,##0)"
    Range("C52:F52").Select
    Selection.Font.Bold = True
    Range("C40:F40").Select
    Selection.Font.Bold = True
    Range("C28:F28").Select
    Selection.Font.Bold = True
    ActiveWindow.SmallScroll Down:=-11
    Range("C16:F16").Select
    Selection.Font.Bold = True
    ActiveWindow.ScrollRow = 1
    Range("A1").Select
    ActiveWindow.SmallScroll Down:=21

    Range("C46").Select
    ActiveCell.FormulaR1C1 = "=COUNT(Sheet4!C[6])"
    Range("F27").Select
    ActiveWindow.ScrollRow = 21
    ActiveWindow.LargeScroll Down:=-1
    Range("A1").Select



    Range("A1").Select
    ActiveCell.FormulaR1C1 = ""
    Range("B2").Select
    Sheets("Detailed").Select
    Selection.AutoFilter Field:=5
    Rows("1:1").Select
    Selection.AutoFilter
    Range("A1").Select
    ActiveWorkbook.Save
    Sheets("Summary").Select
    Range("A2").Select
    Sheets("Detailed").Select
    Sheets("Detailed").Move Before:=Sheets(2)
    ActiveWindow.TabRatio = 0.203
    Sheets("Summary").Select
    ActiveWorkbook.Save


   Range("A54").Select
    ActiveCell.FormulaR1C1 = "Notes:"
    Range("B54").Select
    ActiveCell.FormulaR1C1 = "Mean: average performance"
    Range("B55").Select
    ActiveCell.FormulaR1C1 = "Median: middle performance value"
    Range("B56").Select
    ActiveCell.FormulaR1C1 = _
        "Standard Deviation: average by which performance numbers differ from the mean, ignoring the sign of the difference."
    Range("B57").Select
    ActiveCell.FormulaR1C1 = "Report includes corrections made up to 16/10/07"
    Range("B58").Select
    ActiveCell.FormulaR1C1 = _
        "Charts exclude any skewed performance numbers. Any such exclusions are detailed on the PMs detailed report in the last column"
    Range("B59").Select
    ActiveCell.FormulaR1C1 = _
        "Chart details number of clients on the X axis and performance on the Y axis, broken out by models 4 and 5"
    Range("A2").Select


    '------------------------------------------------------

       ActiveWorkbook.Save
   
     ActiveWorkbook.Close
   
       End If
   myname = Dir()   ' Get next entry.
Loop
   
   
End Sub

 

by: Computer101Posted on 2007-12-16 at 19:57:07ID: 20482783

PAQed with points refunded (500)

Computer101
EE Admin

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...