+ Reply to Thread
Results 1 to 3 of 3

VBA Sumproduct With Multiple Criteria

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Sumproduct With Multiple Criteria

    Hi, I wonder whether someone may be able to help me please.

    I'm trying to put together a formula applied via VB which totals one particular column if certain criteria are met.

    The line I've put together is as below:

    Please Login or Register  to view this content.
    The problem I have is that, although no error message is displayed the returned results are incorrect.

    The problem seems to be around the final part of the formula here:
    Please Login or Register  to view this content.
    If I remove either one of these checks, the correct results as displayed, but as soon as I incorporate the two, this incorrectly shows 'zero'.

    I just wondered whether someone may be able to look at this and let me know where I'm going wrong.

    Many thanks and kind regards

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: VBA Sumproduct With Multiple Criteria

    You are testing for the range to be equal to "Test Advice" AND to "SME", which seems unlikley. You probably need to OR it.

    Try this

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Sumproduct With Multiple Criteria

    Hi @Bob Phillips, thank you for taking the time to reply to my post and for the solution. It works perfectly!

    All the best and kind regards

+ 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. Replies: 6
    Last Post: 08-04-2013, 11:53 AM
  2. Replies: 2
    Last Post: 01-23-2013, 06:25 AM
  3. Replies: 5
    Last Post: 04-20-2012, 08:54 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. Multiple criteria and SUMPRODUCT
    By samirz10 in forum Excel General
    Replies: 2
    Last Post: 01-23-2009, 01:14 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