+ Reply to Thread
Results 1 to 8 of 8

Sumif for a Range (Backwards from most Threads I have read)

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Sumif for a Range (Backwards from most Threads I have read)

    I have attached my excel file. I am trying to do the equivalent of a sumif. I have tried a sum products and a sum(if as an array and neither have worked for me. I have looked up other threads and all of them want to sum multiple columns if one column is true. I want to sum 1 column is any of the value in the same row of a multiple column range are true. I have a bunch of dates in the worksheet dates and want to sum the minutes in column A. Worksheet Minutes per week is where I want this information to total. If there is a date in the dates worksheet the is between the start date and then end date in rows 1 and 2 i want it to sum the total minutes in Column A of worksheet Dates.
    Thank you in Advance

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Sumif for a Range (Backwards from most Threads I have read)

    I guess I can't see the attached file....have you tried a SUMIFS function?
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumif for a Range (Backwards from most Threads I have read)

    I don't see an attachment either.

    But it sounds like you'll need sumproduct to work with ranges of different dimentions..

    something like

    =SUMPRODUCT((multicolumnrange=criteria)*(singlecolumnrangetosum))

  4. #4
    Registered User
    Join Date
    06-12-2013
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumif for a Range (Backwards from most Threads I have read)

    Here is the file
    Attached Files Attached Files

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumif for a Range (Backwards from most Threads I have read)

    In B4 and filled right

    =SUMPRODUCT((Dates!$B$2:$T$291>=B2)*(Dates!$B$2:$T$291<=B3)*Dates!$A$2:$A$291)

  6. #6
    Registered User
    Join Date
    06-12-2013
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumif for a Range (Backwards from most Threads I have read)

    Thank you so much for your help. It works perfectly. Do you mind explaining how it works? Thank you

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumif for a Range (Backwards from most Threads I have read)

    It creates an array of values to be summed
    Created by the True/False results multiplied by the values in column A

    (DateinB-T>=B2, TrueorFalse)*(DateinB-T<=B3, TrueorFalse)*(valueinA)

    True = 1
    False= 0

    So only if both are True will it be added
    If either is false, it will be a 0
    0*0*180 = 0
    0*1*180 = 0
    1*0*180 = 0
    1*1*180 = 180

  8. #8
    Registered User
    Join Date
    06-12-2013
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Sumif for a Range (Backwards from most Threads I have read)

    Thank you for the explanation. It makes a lot more sense to me now. Thank you

+ 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. copy a range row backwards
    By freshfruit in forum Excel General
    Replies: 2
    Last Post: 02-04-2014, 01:54 PM
  2. Mark Threads As Read
    By Tony Valko in forum Suggestions for Improvement
    Replies: 9
    Last Post: 06-17-2013, 12:31 AM
  3. [SOLVED] Loop through named range backwards and populate based on criteria from adjacent cells
    By CDEG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2013, 05:56 AM
  4. [SOLVED] Issue - Threads Say 0 Posts but Threads have Mutliple posts
    By Mordred in forum Suggestions for Improvement
    Replies: 17
    Last Post: 03-30-2012, 05:22 PM

Tags for this Thread

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