+ Reply to Thread
Results 1 to 3 of 3

Conditional Sum of a array of valus

  1. #1
    Registered User
    Join Date
    04-15-2011
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2003
    Posts
    1

    Conditional Sum of a array of valus

    Hello,

    Sorry for my bad english, and for my lack of knowledge regarding excel.

    I'm needing some help. I have uma list of values, like:

    ref. price Quantity
    A 50 10
    B 40 20
    A 50 15
    B 42 30

    I need to have a formula that search all A values and make multiplication of pricexquantity.

    Can anyone help me with this?

    Best regards

    Rui

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,336

    Re: Conditional Sum of a array of valus

    =SUMPRODUCT((A2:A5=A2)*B2:B5*C2:C5)


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Conditional Sum of a array of valus

    Let's say those values are in A2:C500 and you have "A" in E1, In F1 try
    = SUMPRODUCT(--($A2:$A500 = $E1), $B$2:$B$500, $C$2:$C$500)
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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