+ Reply to Thread
Results 1 to 7 of 7

Sumif with multiple criteria

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 365
    Posts
    85

    Sumif with multiple criteria

    Hi,

    I am using the below formula within a macro to calculate the sum of everything with the code "120012". This formula works absolutely fine.

    I'm trying to get the below to calculate the total when the criteria is "120010" + "820600". However i am unsure how to edit the below formula


    Sheets("Journal").Range("K2").Value = WorksheetFunction.SumIf(Sheets("Journal").Range("C:C"), "=120010", _
    Sheets("Journal").Range("D:D"))



    Any help is much appreciated

    Harry

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Sumif with multiple criteria

    Am no VBA expert but try SUMIFs

    Some info here

    https://msdn.microsoft.com/en-us/lib.../ff193011.aspx

    http://www.mrexcel.com/forum/excel-q...lications.html
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sumif with multiple criteria

    Try

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 365
    Posts
    85

    Re: Sumif with multiple criteria

    Thanks for this Jason. However it didn't work

  5. #5
    Registered User
    Join Date
    06-11-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 365
    Posts
    85

    Re: Sumif with multiple criteria

    It does work!!! Thanks Jason!!!

  6. #6
    Forum Contributor
    Join Date
    11-15-2011
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    163

    Re: Sumif with multiple criteria

    I have just been using the SUMIFS function.

    Its not clear if you are trying to find cells in a range or specific cells. You can use the = & operators in the formula. Try this video as I found it helpful.

    https://www.youtube.com/watch?v=mCI7...ature=youtu.be

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Sumif with multiple criteria

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

+ 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] Multiple Criteria SUMIF Using Column as Negative Criteria
    By freybe06 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2014, 04:46 PM
  2. SUMIF or SUMIF's formula with multiple criteria
    By jackiemariee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2013, 06:19 PM
  3. Replies: 2
    Last Post: 01-23-2013, 06:25 AM
  4. 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
  5. Excel 2007 : SUMIF with multiple criteria
    By marioma in forum Excel General
    Replies: 7
    Last Post: 12-09-2010, 04:32 AM
  6. SUMIF with multiple criteria
    By Piraneous in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2010, 09:51 AM
  7. SUMIF with multiple criteria, one criteria a specific string
    By Weasel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-03-2008, 05:32 PM
  8. [SOLVED] SUMIF with multiple criteria for multiple columns to sum a single
    By SavageMind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2005, 11:05 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