+ Reply to Thread
Results 1 to 5 of 5

sumproduct and sumifs using multiple criteria across worksheets

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    sumproduct and sumifs using multiple criteria across worksheets

    I am using code to check a cell value and then sum across worksheets if the cell value checked matches a key word. I have been getting by with the following code: (note my sheets are named sequentially from 1 to 21 and the word to be checked matched is in cell F45)

    Please Login or Register  to view this content.
    I wish to add 1 additional criteria (second word to be matched is in cell K45)

    I have tried code such as:

    Please Login or Register  to view this content.
    As you can probably tell I have no experience whatsoever with the SUMIFS command and my syntax is probably all messed up :/

    Could somebody please correct my mistakes?

    Regards and much thanks,

    Michael.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct and sumifs using multiple criteria across worksheets

    With SUMIFS, the sum range goes first, then followed by each criteria range/criteria combo

    Try:

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: sumproduct and sumifs using multiple criteria across worksheets

    Thank you for the reply.

    The code is accepted but it fails to display any result even when I set up some sheets to match the tested criteria...

    Is there anything else I might try?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct and sumifs using multiple criteria across worksheets

    Are you sure there are exact matches to the combination of criteria? Check for extra spaces maybe in column K value... also are there numbers in column D at row level your investigating?

    It works in my testing...

  5. #5
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: sumproduct and sumifs using multiple criteria across worksheets

    I stand corrected

    The code works, I made simple example which I attached

    The problem was I had lined up the rows wrong

    Please Login or Register  to view this content.
    In the above example my numbers would have been in row 3 (column D) where as this section works when the numbers are in row 2 (column D).

    I must admit I don't fully understand how the code works, we specify Column D and then use the letter A when entering the range, obviously column A is blank. Furthermore we specify a range that extends 1row below where my data is.

    All that aside the code works brilliantly and I thank you for your assistance
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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