+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    6

    Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    I've got a problem that I've been trying to solve for most of the day. Let me try to lay it out for you.

    If have my data arranged horizontally for ease of entry and I would like to sum certain cells if certain conditions are met.

    DATA ARRANGEMENT
    Column B: Customer Name
    Column C: PO#
    Column D: PO Date
    Column E: Type
    Column F: Total Quantity
    Column G: Ship Date
    Column H: Quantity to Ship
    Column I: Ship Date
    Column J: Quantity to Ship
    Column K: Ship Date
    Column L: Quantity to Ship
    Column M: Ship Date
    Column N: Quantity to Ship
    Column O: Ship Date
    Column P: Quantity to Ship
    Column Q: Ship Date
    Column R: Quantity to Ship

    Columns G through R reflect the fact that multiple shipments are often made on one purchase order.

    I would like to sum the values in columns H, J, L, N, P, R based on whether the Customer Name and Type in the row match the same values on another worksheet and based on whether the date to the left of Quantity falls within a given month.

    The data on my reporting spreadsheet is arranged as follows:

    Column A: Customer Name
    Column D: Quantity (where the sum would be reported)
    Cell A2: Type

    I would like to end up with the quantity to be shipped in a given month for a given customer and type.

    The thing that seems to be giving me the biggest problem is that one of the criteria is referring to a value that to the left of the numbers that I want to sum and therefore part of the Sum Range.

    Please help!!!

    Thanks!
    Attached Images Attached Images
    Last edited by tdwenger; 01-31-2011 at 06:33 PM. Reason: Attached screen shots from workbooks . . .

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    Hi,

    Upload your workbook or at least a representative sample of it, along with examples of the results you expect to see and why, and no doubt someone will take a look. It's always easier to see the request in its context.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,694

    Re: Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    Try this formula in D5

    =SUMPRODUCT((Data!$B$4:$B$100=$A5)*(Data!$E$4:$E$100=$A$2)*(Data!$H$3:$R$3="Quantity")*(TEXT(Data!$G$4:$Q$100,"mmm")=C$3),Data!$H$4:$R$100)
    Audere est facere

  4. #4
    Registered User
    Join Date
    01-27-2011
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    Daddylonglegs . . . with a little tweaking to your formula I think I've got it!!! Can you explain why and how this works, so I know for the future. I played with Sumproduct for a long time and couldn't get it to work the way you did, you've saved me!!!

    THANK YOU!!!!!

  5. #5
    Registered User
    Join Date
    01-27-2011
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    When I did this earlier this year I was shortsighted and didn't take into account the year of the Purchase Order. Now that we are nearing the end of the year, the tool is just cycling back to January of 2011 because the year isn't involved in the formula. Is there a way that someone might be able to modify the formula to take the year into account?

    Thanks!

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    Hi,

    Try

    Please Login or Register  to view this content.
    change the first element as necessary to pick up the required year.

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,694

    Re: Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    The original assumed that C3 would contain the 3 letter text month, e.g. Nov, assuming that this cell contains a date in that month (preferably 1st but it doesn't matter), e.g. 1-Nov-2011 then you can amend to

    =SUMPRODUCT((Data!$B$4:$B$100=$A5)*(Data!$E$4:$E$100=$A$2)*(Data!$H$3:$R$3="Quantity")*( TEXT(Data!$G$4:$Q$100,"mmm-yy")=TEXT(C$3,"mmm-yy"),Data!$H$4:$R$100)

  8. #8
    Registered User
    Join Date
    01-27-2011
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sumifs w/ Data in Horizontal Arrangement & Critieria Part of Sum Range

    Daddylonglegs comes through again! Thanks VERY much!

+ 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