+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

  1. #1
    Registered User
    Join Date
    07-02-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    11

    SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

    Hi there!

    I am working with a colleague who doesn't have access to Excel 2007, so I can't use Sumif's to solve this, and I can't add a subtotal line (long story) to the data, which has me stumped on how, then, I can solve this problem. With the data attached (and that I attempted to paste below), I want a sum of lines 1-6 if the date at the top of the first table is the same as the date at the bottom section's month end date. (In other words, in the lower part of the data, under 9/30/11, it should equal $20k and in the part where it says 10/31/11 it should also equal $20k.

    9/30/2011 10/31/2011 11/30/2011
    Line 1 $10,000.00 $15,000.00
    Line 2 $80,000.00
    Line 3 $20,000.00
    Line 4 $10,000.00
    Line 5
    Line 6


    Week 9/9/2011 9/16/2011 9/23/2011 9/30/2011 10/7/2011 10/14/2011 10/21/2011 10/28/2011 11/4/2011
    Month 9/30/2011 9/30/2011 9/30/2011 9/30/2011 10/31/2011 10/31/2011 10/31/2011 10/31/2011 11/30/2011
    End of Month? Yes Yes
    End of Month - date 9/30/2011 10/31/2011

    Sum of lines 1 -6 $- $- $- $- $- $- $- $10,000.00 0


    I've tried doing a sum if, but it will only sum the first row (line 1). I've also tried to do sumproduct or some sort of index/match combo, but can't quite get there. Any ideas? (Also, if it helps for indexing or something like that, I could change the "Line 1, Line 2, etc" to all just say "Line" (I think this would help if i could do SumifS, but alas I can't).

    I REALLY appreciate any help!!!

    Thank you, thank you!
    Attached Files Attached Files
    Last edited by kateWantstoLearn; 07-25-2011 at 05:24 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

    Maybe this,

    B17 y copy across.

    =IF(B14="Yes",SUM(INDEX($B$4:$D$9,0,MATCH(B15,$B$3:$D$3,0))),0)

    Regards

  3. #3
    Registered User
    Join Date
    07-02-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

    Oh, thank you, thank you, thank you, Sailepaty!!!!!!!!!!! I spent a lot of time trying to solve that - you just made my day!!!!! Hooray!

  4. #4
    Registered User
    Join Date
    07-02-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

    Quote Originally Posted by sailepaty View Post
    Maybe this,

    B17 y copy across.

    =IF(B14="Yes",SUM(INDEX($B$4:$D$9,0,MATCH(B15,$B$3:$D$3,0))),0)

    Regards
    I have a follow up question, if you don't mind...

    If my data had had a category on the left (or right hand side) so that to the left (or right) of "Line 1, Line 2, Line 3, Line 4, Line 5, Line 6" it said "Yes" or "no", for instance would there have been a way to do that so that it did what your formula does, but only summed the ones with "Yes"?

    I've re-attached the file to show in case my description is confusing. I tried to solve it with a new "Match" for the Row Number part of the index equation, but then it seems to only pick up the first row with a "Yes".

    Thanks again for all of your help!!
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

    Try this,

    =IF(C14="Yes",SUMIF($A$4:$A$9,"Yes",INDEX($C$4:$E$9,0,MATCH(C15,$C$3:$E$3,0))),0)

    Regards

  6. #6
    Registered User
    Join Date
    07-02-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

    Wow! Thanks a million!!

  7. #7
    Registered User
    Join Date
    07-02-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: SUM IF Across Range - Possibly Using Index / Match, Sumproduct or Hlookup?

    This is "Solved," but I don't know how to mark it as such?

+ 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