+ Reply to Thread
Results 1 to 5 of 5

Complicated SumIfs/Sumif functions

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    40

    Complicated SumIfs/Sumif functions

    I need some help with a formula.

    In my attachment, I'm really referring to the cells that appear at f146 - that would be the first one.

    So, I want to sum up cells that meet a few criteria - for the "Current," line, the values to sum would come from other "Current" rows.

    For the "Weekday," portion, the values to add would come from the values listed as weekday in column a.

    The difficult part is - the length of the month changes all year and I will never know which month will be thrown at me.

    To verbalize that formula, I need to sum up values from column F that are in the same month we are trying to total, are the current figures and are weekdays. I need the formula to be flexible enough and actually search for the appropriate values to add from the range F22:F700 (so I can use the same formula regardless of the changes the calendar causes).

    Any help would be GRREATLY appreciated.upload.xlsm

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Complicated SumIfs/Sumif functions

    Try this:
    =SUMIF($A$19:$A145,"Weekday",$F$19:$F145)-SUMIF($D$19:$D145,D146,$F$19:$F145)
    Quang PT

  3. #3
    Registered User
    Join Date
    06-19-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Complicated SumIfs/Sumif functions

    Thank you! Can you explain the second SUMIF? I don't understand what it is evaluating.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Complicated SumIfs/Sumif functions

    First SUMIF will sum all "Weekday" so far, second SUMIF sum all "Weekday Total" so far
    For instance, if current month is March, secon SUMIF sum all "Weekday Total" in upper rows (there are two of Jan and Feb) while the first SUMIF sum all weekdays.
    Pay atention that I use relative address in $A$19:$A145.

  5. #5
    Registered User
    Join Date
    06-19-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Complicated SumIfs/Sumif functions

    This is correct only in the first month, in the months beyond that, it doesn't work correctly.

    Could I add if statements to evaluate if the numbers are in the correct month? Maybe I would have to add indirects somewhere in the sheet to be sure this is summing the correct numbers. Any more ideas?

    It seems like the range should end around aruond row 700.

+ 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