+ Reply to Thread
Results 1 to 3 of 3

Macro results differ depending on PC

  1. #1
    Registered User
    Join Date
    10-30-2003
    Location
    Chicago
    Posts
    9

    Macro results differ depending on PC

    I run a macro on an Excel workbook that I have shared on a file server so that more than one computer within my office can access it. Each PC has the same version of Excel (2003) installed.
    My problem is: Out of nowhere when I open the workbook and run the macro on the computer I normally run it on, I started getting a bad result once completed. I tried on another computer that can run it as well and it worked correctly. I am not receiving any error or debug notices. It simply messes up the results on only one computer. I deleted and recreated the file. Also I uninstalled and reinstalled Excel, to no avail.
    I have tracked the problem to the part in the macro where it calls upon Excel's Subtotals function. My macro was created to subtotal a column by a particular column and then subtotal again within that the same column by another column and once more.

    Basically, I have an end result that can be viewed by the different summary numbers at the top of the tree to the left of the workbook:
    1 = Grand Total
    2 = All Account (column 9) totals and Grand total
    3 = All Product (column 5) totals within each Account total and Grand total
    4 = All Buy/Sell (column 6) totals within each Product total within each Account total and Grand total
    All totals of which are calculating the sum of column 7.

    But only on this one computer does it mess up this totaling function during the 2nd and 3rd parts. I have even subtotaled the workbook through the Excel function and not the macro, and got the same results. So I know there is nothing wrong with my macro or workbook, but more so the subtotal function of that one computer.

    My end result places the subtotal rows within the wrong areas. It calculates the sum correctly, but is not consistant on where it will place that row.

    Here below is a copy of the subtotal portion of the macro:

    Columns("A:L").Select
    Selection.Subtotal GroupBy:=9, Function:=xlSum, TotalList:=Array(7, 10), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
    Selection.Subtotal GroupBy:=5, Function:=xlSum, TotalList:=Array(7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True
    Selection.Subtotal GroupBy:=6, Function:=xlSum, TotalList:=Array(7), _
    Replace:=False, PageBreaks:=False, SummaryBelowData:=True

    Please let me know if you have any idea of what it may be or if anyone has experienced a corrupt subtotaling fuction within Excel, and know how to correct it.
    Much appreciated.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Make sure your systems all have the same Add-Ins installed, specifically the Analysis ToolPak. There are certain SubTotal functions ONLY available via this addin.

    HTH

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Registered User
    Join Date
    10-30-2003
    Location
    Chicago
    Posts
    9

    Regarding add-ins

    Neither of the computers have any add-ins installed. They are all available but none checked. So I don't think thats it. Unless I need to install those.
    Do you have any other suggestions?
    Last edited by noah; 05-12-2005 at 05:05 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1