+ Reply to Thread
Results 1 to 4 of 4

Help with Adding Date Range to Formula

Hybrid View

  1. #1
    Registered User
    Join Date
    02-08-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Wink Help with Adding Date Range to Formula

    Hi I have a formula that is working great in a report I have to generate. However I now want to add to it a date range. I'm stumped and can't get it to work.

    The formula is as follows:

    =SUMPRODUCT(SUBTOTAL(9,OFFSET('test'!$U$2:$U$4483,ROW('Test'!$U$2:$U$4483)-ROW('test'!$U$2),0,1)),--('test'!$A$2:$A$4483=H4))

    I want to add date conditions that exist in Column C.

    So two examples would be:

    Provide total of anything older than 2/28/13

    Provide total of date range of 4/1/13 to 6/30/13

    I'm hoping that I can incorporate it into the existing formula. Any help would be greatly appreciated! Thanks!

  2. #2
    Registered User
    Join Date
    02-08-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Help with Adding Date Range to Formula

    Any takers? Please and thank you! I need this in order to turn in the report.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702

    Re: Help with Adding Date Range to Formula

    Just add the conditions to the end, e.g. for one more condition, dates < 28th Feb

    =SUMPRODUCT(SUBTOTAL(9,OFFSET('test'!$U$2:$U$4483,ROW('Test'!$U$2:$U$4483)-ROW('test'!$U$2),0,1)),--('test'!$A$2:$A$4483=H4),--('test'!$C$2:$C$4483<DATE(2013,2,28)))

    ...or between dates

    =SUMPRODUCT(SUBTOTAL(9,OFFSET('test'!$U$2:$U$4483,ROW('Test'!$U$2:$U$4483)-ROW('test'!$U$2),0,1)),--('test'!$A$2:$A$4483=H4),--('test'!$C$2:$C$4483>=DATE(2013,4,1)),--('test'!$C$2:$C$4483<=DATE(2013,6,30)))

    You can put the dates in cells and reference those, if you want, rather than "hardcoding" the dates in the formula
    Audere est facere

  4. #4
    Registered User
    Join Date
    02-08-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Help with Adding Date Range to Formula

    Thank you formula worked! Mental block on Friday! Greatly appreciated!

+ 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