+ Reply to Thread
Results 1 to 2 of 2

a macro to add from 'x' number of identical sheets where x is specified on a cell

  1. #1
    Registered User
    Join Date

    a macro to add from 'x' number of identical sheets where x is specified on a cell

    Can anybody please help me create a Macro that takes adds G1 from all the Sheets Except the one on which the macro will be written.
    For instance I have Template, template(2), Template (3)......... and i need to add the values from G1 on all of them and put that total on G1 of a mastersheet.
    The reason i need a Macro is because. The number of sheets present also depend on an input cell on this master sheet, which in turn invokes the makesheet Macro.
    So if A4 on the mastersheet:4, there will be 4 copies of an existing template and i will put some inputs into these 4 templates and then on the master sheet i need a macro that adds all these sheets.

    Also, I need for it to ignore 1 sheet, which is a Anuity table that is being referenced to look up values.

    I hope i was clear. Any guide would be helpful.
    Thank you,

  2. #2
    Registered User
    Join Date
    Try this user-defined function. The name of the function is "addsheets()". It adds cell G1 from all worksheets except the current, active worksheet. Also, it skips the worksheet titled "Annuity". If you need to change the name of the annuity worksheet, open up VBA.

    Hope this helps!
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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


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