+ Reply to Thread
Results 1 to 4 of 4

Return sum of values in column when matching and also when Row matches input

  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Return sum of values in column when matching and also when Row matches input

    In the attached sheet, I have many products listed in columns, and the columns repeat with the following (Purc. #, Cost, Cust. Inv )

    I am needing help making a formula that will, sum the total cost for the a specified Purch. # and specified product id.

    I have tried all sorts of ways to do this but a search based on two inputs is too difficult for myself to works out. I thought it would be easy at first, but no luck after trying for hours.

    I hope someone has an idea how this can be solved and Iam fascinated with what the solution is.

    Thanks
    Dave

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Return sum of values in column when matching and also when Row matches input

    Array formula (accepted Ctrl + Shift + Enter)

    Please Login or Register  to view this content.
    in L3

    for start
    Last edited by tom1977; 11-24-2011 at 07:16 AM.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: Return sum of values in column when matching and also when Row matches input

    try
    =SUMIF(OFFSET(1:1048576,6,MATCH($L$1,6:6,0)-1,20000,1),$L$2,OFFSET(1:1048576,6,MATCH($L$1,6:6,0),20000,1))
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  4. #4
    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,461

    Re: Return sum of values in column when matching and also when Row matches input

    Building on Tom's answer, this might work ... or at least go a step further:

    =SUMIF(OFFSET($A$7,0,MATCH(E2,6:6,0)-1,1000,1),E1,OFFSET($B$7,0,MATCH(E2,6:6,0)-1,1000,1))

    Adjust the 1000 to be the maximum number of rows of data.


    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


+ 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