+ Reply to Thread
Results 1 to 2 of 2

Calculating hidden spreadsheets with multiple columns

  1. #1
    Registered User
    Join Date
    08-29-2013
    Location
    brooklyn
    MS-Off Ver
    Excel 2003
    Posts
    11

    Calculating hidden spreadsheets with multiple columns

    My total speasheet has 10 columns, the below code only calculates 1 (Surgical Dentures) column where would i add the the calculations for lets say, main surgery, clinical surgery, orthopedic surgert etc


    <code>
    Sub addtotals()
    Dim i&, ts$, yr$
    ts = "TOTAL"
    yr = "2013"

    On Error GoTo err1


    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual
    Application.EnableEvents = False

    Worksheets(ts).Range("I3:I8,O3:O8").ClearContents


    'add upp the numbers to the TOTAL sheet -- in this example I only put the "Surgical Dentures" totals in.
    For i = 1 To Worksheets.Count
    If Left(Worksheets(i).Name, Len(yr)) <> yr Then GoTo nxi
    Worksheets(ts).Range("I4").Value = Worksheets(ts).Range("I4").Value + Worksheets(i).Range("F101").Value
    nxi:
    Next i

    </code>

  2. #2
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Calculating hidden spreadsheets with multiple columns

    I assume you want the hidden sheets to stay hidden afterwards so
    Please Login or Register  to view this content.
    Last edited by hulpeloos; 09-02-2013 at 08:34 AM.
    If solved remember to mark Thread as solved , to mark your thread as Solved select Thread Tools and click Mark thread as Solved.

    I can't read the mind of my wife so then I get picture but no sound .... and then I mostly get the idea, same goes here picture your outcome and I get the idea.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 06-25-2013, 10:27 AM
  2. VBA multiple criteria compare: 2 spreadsheets each with 3 columns
    By g0nz0 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2012, 06:03 PM
  3. Replies: 0
    Last Post: 09-13-2012, 11:10 AM
  4. Macro to compare multiple columns between 2 spreadsheets based on a single reference
    By chandra79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2012, 11:13 AM
  5. Calculating multiple columns of data
    By sherimark in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2008, 03:33 PM

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