+ Reply to Thread
Results 1 to 4 of 4

HELP! Adding IF Function to Existing SUMIF Function

  1. #1
    Registered User
    Join Date
    11-19-2020
    Location
    South Africa
    MS-Off Ver
    Microsoft Office Home & Business 2016
    Posts
    9

    HELP! Adding IF Function to Existing SUMIF Function

    Hi There,

    I hope someone can help.

    I have attached a spreadsheet that has a few formulas.

    Explanation of sheets:
    "Daily Transactions" is the sheet used that will be filled in daily with stock in and out. My focus on this sheet is column F. (will explain soon)
    "Warehouse 1" & "Warehouse 2" is linked to "Daily Transactions" and will automatically deduct and add stock as they are filled in on the "Daily Transactions Sheet"
    There is a formula in column J & K that is linked to the "Daily Transaction Sheet"

    My question is, how do I add another criteria in the SUMIF function of column J & K to be able to not only lookup the product, but also Column F on the "Daily Transaction" sheet.
    I want the formula to be able to see which product has been dispatched/received, and also from which warehouse it has been taken, so that it will deduct the stock from the correct warehouse.

    I had something in mind to replace the reference to B6 in this formula of column J with an IF function to say lookup the product, if the warehouse is "Warehouse 1" and on the other sheet, lookup the product if warehouse is "Warehouse 2"
    =C6+SUMIF('Daily Transactions'!G:G,B6,'Daily Transactions'!J:J)

    And I would likely have to put the same criteria in the formula in column K, because the two column's work together to give me my current stock values.

    If anyone can assist me with this, I would really appreciate it.

    Currently on my main workable sheet, I have a "Daily Transaction" sheet for each Warehouse and it get confusing work on multiple sheets.

    Please ignore the yellow cells that show's #N/A, they are just there for my stock controller to make sure he spells the product names correctly, so that the other sheets can add and subtract the products.
    I keep most of the sheet locked and only allow certain fields to be filled in.

    Thanks in Advance :-)
    Gisela
    Last edited by Gisela1209; 06-10-2021 at 07:12 AM.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: HELP! Adding IF Function to Existing SUMIF Function

    You may need SUMIFS

    =C6+SUMIFS('Daily Transactions'!J:J,'Daily Transactions'!G:G,B6,'Daily Transactions'!F:F,$B$3)

    AND

    =J6-SUMIFS('Daily Transactions'!K:K,'Daily Transactions'!G:G,B6,'Daily Transactions'!F:F,$B$3)
    Quang PT

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: HELP! Adding IF Function to Existing SUMIF Function

    deleted post
    Happy with my advice? Click on the * reputation button below

  4. #4
    Registered User
    Join Date
    11-19-2020
    Location
    South Africa
    MS-Off Ver
    Microsoft Office Home & Business 2016
    Posts
    9

    Re: HELP! Adding IF Function to Existing SUMIF Function

    Thank you so much.
    This is exactly what I needed. I tested it now and it works.

+ 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. Nested IF function or VLOOKUP for picking a value and adding to existing value
    By DexterStagg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2021, 03:57 AM
  2. Adding INDIRECT function to an existing IF statement
    By Roksman in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-22-2020, 01:58 AM
  3. [SOLVED] Help on adding an IFERROR/IF function to an existing formula.
    By Albert Dirk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-23-2016, 07:16 AM
  4. [SOLVED] Adding button text change function to existing macro
    By JohnDoh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2015, 05:25 AM
  5. Adding in a multiplication function to an existing macro
    By 6423joel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2013, 06:02 PM
  6. [SOLVED] Adding code for pivot cache refresh within an existing function
    By beckdog in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2013, 02:51 PM
  7. Adding IF function to existing (complex) Formula
    By NDRYNWA in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-24-2013, 06:56 AM

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