+ Reply to Thread
Results 1 to 9 of 9

I can't find the right mix of formulas, sumifs, match, sumproduct

  1. #1
    Registered User
    Join Date
    02-02-2015
    Location
    FL
    MS-Off Ver
    2013
    Posts
    4

    I can't find the right mix of formulas, sumifs, match, sumproduct

    I have a large table of data and need to look up the department in one column, the job type in another column and then add the costs related to those two criteria. However the costs are in columns by month and I would like the formula to be able to add costs for the months to date indicated by the date given.


    Each job type will be on a separate line and i'd like to be able to change the YTD number. So I can see for the department "Tower" as of 3/31/16, the total costs are $20,360 for X-RAY and $15,705 for Ultrasound. So the values in Cells C21 & C22 will change if I change the date in C20.
    Attached Files Attached Files

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    2-dimensional array summation.

    In C21:
    Please Login or Register  to view this content.
    Confirm entry with CTRL+SHIFT+ENTER, not just the ENTER key.
    (The formula will display with {braces} around it if you did this, and will return #VALUE! if you did not).

    Then you can pull it down.

    Note that this will deliver a different result for your example for "Ultrasound" -- your example value seems to have excluded row 10.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Registered User
    Join Date
    02-02-2015
    Location
    FL
    MS-Off Ver
    2013
    Posts
    4

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    this is helpful...almost there....can we add something to lookup cell 20 in column A similar to looking up cell 21 in column F??
    THANK YOU!!

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

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    Use SUMPRODUCT instead of array formula:

    C21 then copy down:

    Please Login or Register  to view this content.
    Quang PT

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    Or try this ...

    =SUMPRODUCT(($F$3:$F$15=A21)*OFFSET($A$3:$A$15,0,1,,MATCH($C$20,$B$1:$E$1,0)))

    Normal enter.

  6. #6
    Registered User
    Join Date
    02-02-2015
    Location
    FL
    MS-Off Ver
    2013
    Posts
    4

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    Thank you for this answer! I would like to add one thing if possible. Is there a way to include the Department as a lookup condition? I'd like the formula to look up the department listed in A20 in column A. There can be the same Job Type for multiple departments so it's important to be able to add that. Thank you!

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    Try ...
    =SUMPRODUCT(($A$3:$A$15=$A$20)*($F$3:$F$15=A21)*OFFSET($A$3:$A$15,0,1,,MATCH($C$20,$B$1:$E$1,0)))

  8. #8
    Registered User
    Join Date
    02-02-2015
    Location
    FL
    MS-Off Ver
    2013
    Posts
    4

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    Ok, nevermind, I was able to add the piece I needed myself. THANK YOU SO MUCH!! I appreciate your help! I had been working at this for so long! I need to learn more about what offset does.

  9. #9
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: I can't find the right mix of formulas, sumifs, match, sumproduct

    You're welcome!

+ 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] Trouble stacking multiple Index and match formulas with sumifs
    By Prankster182 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-07-2015, 08:37 AM
  2. Replies: 5
    Last Post: 02-06-2015, 08:44 PM
  3. [SOLVED] Sumproduct or Sumifs
    By adamsc57 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2015, 09:10 PM
  4. [SOLVED] SUMPRODUCT using MATCH to find column
    By jwillis07 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-16-2014, 11:28 AM
  5. Match, Sumproduct to find the corresponding Value
    By srizki in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2013, 06:04 PM
  6. [SOLVED] Sumifs ,or SUMPRODUCT
    By jamilm in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2012, 06:20 PM
  7. Replies: 0
    Last Post: 08-26-2011, 12:45 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