+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT/SUMIF Issues

Hybrid View

  1. #1
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: SUMPRODUCT/SUMIF Issues

    See attached workbook for a working solution of a dynamic range "Index" along with a macro to update it only when sheet "Summary" is activated ( or selected)
    here is the macro:
    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    Dim Ws As Worksheet
    Dim i As Integer
    'Change Dynamic range "Index" only if Summary sheet is activated
    If Sh.Name = "Summary" Then
       'Disable the EVENTS procedure so this one is not calling itself over and over
       Application.EnableEvents = False
       i = 0
       'Scan each sheets in the workbook
       For Each Ws In ActiveWorkbook.Worksheets
          'Except for sheets "Instructions" and "Summary"
          'Put worksheet name in dynamic range "Index"
          If Ws.Name <> "Summary" And Ws.Name <> "Instructions" Then
             Sheets("Instructions").Range("P7").Offset(i) = Ws.Name
             i = i + 1
          End If
       Next
       Application.EnableEvents = True
    End If
    End Sub
    We don't want this macro to be activated too often and it makes sense to update the "Index" dynamic range only when you select sheet "Summary" as when you are in any other sheet, results of the formulas in that sheet is not important to us.
    Hope this helps
    Regards
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  2. #2
    Registered User
    Join Date
    04-25-2014
    Location
    Alaska
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: SUMPRODUCT/SUMIF Issues

    Pierre,

    You are a god-send! Thank you very much for the help, I truly appreciate it!

    Justin

+ 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. SUMIF and SUMPRODUCT issues
    By djbcktt in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-19-2013, 05:38 PM
  2. sumproduct issues
    By Dyakin in forum Excel General
    Replies: 6
    Last Post: 03-29-2012, 10:03 AM
  3. Issues with Sumproduct
    By Chareth Cutestory in forum Excel General
    Replies: 6
    Last Post: 09-02-2011, 06:08 PM
  4. sumproduct issues
    By tweety127 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2008, 11:38 AM
  5. [SOLVED] SUMPRODUCT issues
    By Ashlynn Grace in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-26-2006, 05:00 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