+ Reply to Thread
Results 1 to 4 of 4

Sumif Two workbooks with additional Criteria

  1. #1
    Registered User
    Join Date
    10-12-2017
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    18

    Sumif Two workbooks with additional Criteria

    Hi there,

    I have 2 excel workbook, Buyer example and Shipment Data.


    in the Buyer Example workb, there are the fields of TR number, buyer, buyer number and Cost.
    In the Shipment data wb, there are the buyer, buyer number and shipment amount.

    The shipment data has a long list of shipment amount that needs to be sum up and added into the buyer example.

    1. I have to match the buyer and buyer number in the shipment data with the Buyer example to calculate the total shipment amount that needs to be added into the buyer example wb
    2. However there is a criteria to the amount that should be calculated in the shipment amount of the buyer example wb.
    3. The criteria is that the Shipment amount should be 60% more than the Cost for it to be considered paid.
    4. The Buyer number can appear in multiple TR number. hence once the shipment amount has reached 60% more than the cost, the shipment amount will be carry forward to the next line that matches the buyer and buyer number.


    i have considered using sumif, but i am not sure how to add in the criteria of the 60%


    I have attached two workbooks for the example. in the buyer example wb, i have added the final product that the excel should produce.
    Attached Files Attached Files

  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: Sumif Two workbooks with additional Criteria

    If I've understood correctly then with both workbooks open enter the following in F2 of the Buyer workbook and copy it down

    FORMULA]=IF(SUMIFS('[Shipment data.xlsx]Sheet1'!$C$2:$C$16,'[Shipment data.xlsx]Sheet1'!$B$2:$B$16,C2)>D2*1.6,"Paid","")[/FORMULA]
    Similarly in E2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Obviously you should create dynamic range names for columns B & C of the shipment data so that you can use the range name rather than the C2:C16 and B2:B16 cell refs in the formula.

    Is there a reason why you separate these workbooks. Can't you have the Shipment Data as another sheet in the Buyer workbook?
    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
    Registered User
    Join Date
    10-12-2017
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    18
    Quote Originally Posted by Richard Buttrey View Post
    If I've understood correctly then with both workbooks open enter the following in F2 of the Buyer workbook and copy it down

    FORMULA]=IF(SUMIFS('[Shipment data.xlsx]Sheet1'!$C$2:$C$16,'[Shipment data.xlsx]Sheet1'!$B$2:$B$16,C2)>D2*1.6,"Paid","")[/FORMULA]
    Similarly in E2


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Obviously you should create dynamic range names for columns B & C of the shipment data so that you can use the range name rather than the C2:C16 and B2:B16 cell refs in the formula.

    Is there a reason why you separate these workbooks. Can't you have the Shipment Data as another sheet in the Buyer workbook?

    Hi Richard,
    Thanks for The reply. I cannot combine into one workbook as they are done by different departments and there are other data/worksheets in their respective workbook.

    Hence, is it possible to code the sum if into vba where only buyer example workbook is open?

    Also how do I solve point 4. If the shipment amount has reached 60% more than the cost, the balance shipment amount will be carried over to the next like that matches the buyer and buyer no.
    Last edited by ili_Sophia; 09-03-2019 at 11:02 AM.

  4. #4
    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: Sumif Two workbooks with additional Criteria

    Hi,

    Does using this formula in a new column F (after shifting the last one across one column)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If not please supply a worked example where you have manually entered some typical results that you expect.

+ 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. [SOLVED] I need to add additional criteria to an array Sumif that counts individual values
    By dc0822 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-20-2015, 04:24 PM
  2. HELP! SUMIF with additional criteria required...
    By Rachel88 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-12-2015, 09:07 AM
  3. [SOLVED] Sumif between a range of dates plus one additional criteria
    By caliskier in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-28-2014, 06:03 PM
  4. [SOLVED] SUMIF by date and one additional criteria
    By ardais in forum Excel General
    Replies: 14
    Last Post: 06-17-2012, 03:37 PM
  5. how to add additional criteria to a SUMIF formual?
    By jgomez in forum Excel General
    Replies: 5
    Last Post: 07-15-2011, 10:16 AM
  6. Sumproduct/sumif/indirect across multiple workbooks, worksheets, multiple criteria
    By robgardner15 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2011, 02:35 AM
  7. Excel 2003 Additional Workbooks
    By compound in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2007, 12:07 PM

Tags for this Thread

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