+ Reply to Thread
Results 1 to 4 of 4

Using SUMPRODUCT between ranges.

  1. #1
    Registered User
    Join Date
    05-14-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    50

    Using SUMPRODUCT between ranges.

    Hi Guys,

    I'm looking to add up number of cells between two date ranges in column A7:A160 but its formatted as Date & Time.

    When the data came in it was just data only so I used this formula:

    Please Login or Register  to view this content.
    but it no longer works correctly due to the data now coming in as Date & Time format

    So i'm using:
    Please Login or Register  to view this content.
    which does work to display one date.

    how can I adapt the above formula to display data between two dates?

    Thank you for your help !

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Using SUMPRODUCT between ranges.

    Guessing its your higher date that is causing the issue and that A6 and C6 are formatted as date only.
    Try


    =SUM(COUNTIFS(MASTER!A7:A160,">="&A6,MASTER!A7:A160,"<"&C6+1))
    Frob first, tweak later

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Using SUMPRODUCT between ranges.

    =SUMPRODUCT((INT(Master!$A$7:$A$160)>=A6)*(INT(Master!$A$7:$A$160)<=C6))

    will also do it, but it is the higher date that's causing the problem, insofar as COUNTIFS rejects anything where the date = c6, when the data are date time.

    Edit: No it looks OK
    Last edited by Glenn Kennedy; 08-14-2016 at 05:00 AM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    05-14-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Using SUMPRODUCT between ranges.

    Thank you Neil and Glenn both formulas work, have decided to use the SUMPRODUCT formula.

    Cheers

+ 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. [SOLVED] sumproduct for two ranges
    By stewart1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-16-2014, 01:56 PM
  2. Help with SUMProduct with two date ranges
    By Muttstaz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-16-2011, 04:03 PM
  3. SUMPRODUCT using 2 different date ranges
    By PowerSchoolDude in forum Excel General
    Replies: 6
    Last Post: 06-22-2009, 05:07 PM
  4. Sumproduct with different ranges
    By Kenny J in forum Excel General
    Replies: 7
    Last Post: 11-09-2008, 10:46 PM
  5. [SOLVED] Need help with sumproduct and dynamic ranges
    By Bill_S in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-18-2006, 09:25 PM
  6. sumproduct between 2 ranges
    By Patty via OfficeKB.com in forum Excel General
    Replies: 4
    Last Post: 07-14-2005, 04:05 PM
  7. [SOLVED] PRoblem with Ranges and Sumproduct under VBA
    By Jeff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2005, 01:06 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