+ Reply to Thread
Results 1 to 12 of 12

Formula about sum value if two column matched

  1. #1
    Registered User
    Join Date
    01-17-2017
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Formula about sum value if two column matched

    Dear buddies,
    I have an excel formula question , which I have tried several times.

    I want to sum the amount (Column C ) if the value is Column B & Column C is matched ..

    Like the picture, the return value should be $300

    Does anyone can help me , thanks in advance !


    JPEG.JPG

    kary
    Last edited by karyx; 01-17-2017 at 01:41 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Formula about sum value if two column matched

    Hi, welcome to the forum

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff) - and, depending on what browser is being used, some pics dont even show up on the forum

    Your workbook should show a small desensitized example of the data you are working with and a manual mock-up of the expected results.

    Having said that, I *think* this is what you want/have. I would do this with a helper column, then sum that...
    A
    B
    C
    D
    1
    aa aa
    100
    100
    2
    bb zz
    200
    500
    3
    cc xx
    300
    0
    4
    dd yy
    400
    0
    5
    ee bb
    500
    0

    D1=IFERROR(INDEX(C:C,MATCH(A1,B:B,0)),)
    copied down
    Then sum that column
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-17-2017
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Re: Formula about sum value if two column matched

    Really sorry that .
    I have attached the working file.

    The result I expected is $300 , because only two cells are matched , and I want the sum of these two amounts.

    Sorry again , and thanks a lot.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Formula about sum value if two column matched

    The following array entered formula* is another way to arrive at the result:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    *Array entered formulas are activated by simultaneously pressing the Ctrl, Shift and Enter keys while the cell containing the formula is in the edit mode.
    Note this assumes that the 2014 values begin in A2.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Formula about sum value if two column matched

    That results in $600 - it is adding three values instead of just the two in red.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    01-17-2017
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Re: Formula about sum value if two column matched

    thanks jet , Aligw.

    the result i want is $300.. the sum of just two values....

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Formula about sum value if two column matched

    Applied to the file attached to post #3 the formula in F5 would read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I understand the criteria the sum should be 600 because 110600324 is in both B8 and C7.
    Let us know if you have any questions.

  8. #8
    Registered User
    Join Date
    01-17-2017
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Re: Formula about sum value if two column matched

    my mistake , jet !

    you are correct , and million thanks to you !!

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Formula about sum value if two column matched

    You're Welcome and thank you for the feedback. If Ford's and/or my solution works on your actual data then please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formula about sum value if two column matched

    3 cells are matched: 110600195, 110600237, 110600324 so total is 600

    ,

  11. #11
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Formula about sum value if two column matched

    or can try
    =SUMPRODUCT(ISNUMBER(MATCH($C$5:$C$9,$B$5:$B$9,0))*($D$5:$D$9))
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Formula about sum value if two column matched

    Mmmm, well the image and instructions in the opening post were very misleading, then!!!

+ 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. When first pair are matched, copy entry beside the column to another column
    By seanryano in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2015, 11:14 AM
  2. File Open and Search column from A1:CE1. If matched than copy entire row for that column.
    By shivanisachdeva167 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-05-2014, 01:51 PM
  3. Replies: 6
    Last Post: 01-29-2014, 12:22 AM
  4. Search results of a column display a set value in another column if matched
    By rkrause54 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-12-2013, 01:59 PM
  5. Replies: 12
    Last Post: 12-28-2012, 07:49 PM
  6. Get matched values of a column based on the value of other column
    By Bluecarbon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-23-2009, 09:22 AM
  7. Replies: 3
    Last Post: 08-01-2006, 08:15 PM

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