Consulting

Results 1 to 8 of 8

Thread: Sum multiple lines based on multiple criteria

  1. #1
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location

    Sum multiple lines based on multiple criteria

    I need 2 different formulas that can look at multiple rows and do a sum based on if a condition exists (or does not exist) at the individual order level.

    The rows are orders and each order can have multiple rows.

    The attachment explains what I’m trying to do.

    Thanks for any help.

    JimS

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    The first would be

    =SUMIF(Data!B:B,"P1",Data!D)

    but I don't see a Qual of Blue.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location
    Wouldn't this just sum the rows with P1?

    =SUMIF(Data!B:B,"P1",Data!D)

    I need all the rows that make up an order sumed if any of the rows of an order has a P1.

    As far as the Blue they're in there at cells:
    C135, C147, C196, C388, C684 and C872

    This second formula would also need to look at all the rows of each order to determine if there is a Blue.

    I'm thinking a Frequency & Match formula but cannot figure it out.

    Thanks...

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I would just pivot the data
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location
    I need a formula - this is just half of the equation that I'm building.

  6. #6
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location
    Tried building a pivot but cannot get it configured in a way that I can get the totals I need on a consistent basis.

    Any other ideas?

    JimS

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Here's an example that pivots the first requirement http://cjoint.com/?0mowSyQZS6o
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location
    Thanks XLD.

    I'm just not going to be able to use a Pivot Table for this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •