+ Reply to Thread
Results 1 to 3 of 3

SUMPRODUCT Loop Question

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    SUMPRODUCT Loop Question

    Good afternoon. This is my first time posting a question so please bare with me. I'm using a SUMPRODUCT in a vba code. I'm trying to loop it across a row of cells, changing the sumproduct range nested within as it moves along. Example:
    =SUMPRODUCT((Timeline!$C$3:$C$10000>DATEVALUE("12/31/2010"))*(Timeline!$C$3:$C$10000<DATEVALUE("02/01/2011")))
    I'm wanting the date value to move up a month in both instances as it loops across the row. Again, I apologize if this is in any way vague but any assistance is GREATLY appreciated.

    From the spreadsheet attached, I'm doing a sumproduct from the Timeline tab.
    Attached Files Attached Files
    Last edited by dash11; 04-10-2012 at 06:39 PM. Reason: Added spreaddsheet example

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: SUMPRODUCT Loop Question

    How big is the loop, start and end cells? Is your example the first one, and are the dates to move along stored anywhere on the sheet?

  3. #3
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: SUMPRODUCT Loop Question

    The lookup to the "Timeline" is a data tab that contains a range of dates that I'm trying to do a sumproduct of. I'm not sure what is meant by "how big is the loop" but the sumproduct formula will move along a row for 12 months. For example, my January sumproduct result will be from the example above being a Datevalue between 12/31/10 and 2/01/11 (January 2011). Then for the next column over (February 2011), I will need the date parameters to both move over one month.

+ 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