[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

consolidate sheets

Asked by CHICHI120976 in Microsoft Excel Spreadsheet Software

Tags: consolidate, worksheet

The following codes compile the worksheets stored in a folder into one workbook. All these worksheets have exactly the same format and column /row headings. i need help on
having another worksheet on the same workbook that consolidates the figures in the worksheet, as follows:

Private Sub compileinput_Click()
Dim FSO, Fld, Fil, TB As Workbook, MB As Workbook
Dim MainFolderName As String, ws As Worksheet
   Application.ScreenUpdating = False
   Set FSO = CreateObject("Scripting.FileSystemObject")
   Set MB = ActiveWorkbook
   MainFolderName = openinput1.Text
   Set Fld = FSO.GetFolder(MainFolderName)
   For Each Fil In Fld.Files
       If Fil.Type = "Microsoft Excel Worksheet" Then
           Set TB = Workbooks.Open(Fil.Path)
           For Each ws In TB.Worksheets
               If Left(ws.Name, 2) = "PH" And Right(ws.Name, 4) = "-PHP" Then
                   ws.Copy MB.Sheets(1)
               End If
           Next
           TB.Close False
       End If
   Next
   Unload Me
   
   Dim str As String
    On Error Resume Next
    For Each ws In ActiveWorkbook.Worksheets
    str = UCase(ws.Name)
    If InStr(1, str, "-PHP") > 0 Then
        str = Replace(str, "-PHP", "")
        ws.Name = str
    End If
    Next ws
    On Error GoTo 0
   Application.ScreenUpdating = True
End Sub

each worksheet has the following format:

column A:      account numbers
column B to D:      set1, set2, set3, respectively

For example:

account numbers            set1            set2            set3
10001                  5            3            2
10002                  4            1            7            
10003                  3            7            8


lets say the worksheets that will in turn consolidate would be around 10 worksheets.  
First worksheet is named as sheet1 while the last worksheet is sheet10.


the consolidating worksheet would then have the following formula:

account numbers            set1                        set2            
10001                  =SUM(Sheet1:Sheet3!b2)            =SUM(Sheet1:Sheet3!c2)            
10002                  =SUM(Sheet1:Sheet3!b3)            =SUM(Sheet1:Sheet3!c3)                        
10003                  =SUM(Sheet1:Sheet3!b4)            =SUM(Sheet1:Sheet3!c4)            


...and so forth.


how do i then automatically create the consolidating worksheet?  thanks.
[+][-]08/19/04 01:41 AM, ID: 11839150Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: consolidate, worksheet
Sign Up Now!
Solution Provided By: DRJ555
Participating Experts: 2
Solution Grade: A
 
[+][-]12/06/04 08:36 AM, ID: 12755582Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/10/04 07:42 AM, ID: 12793211Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93