+ Reply to Thread
Results 1 to 5 of 5

Conditional Sumif query ....

  1. #1
    Registered User
    Join Date
    03-14-2008
    Posts
    3

    Conditional Sumif query ....

    I have a workbook with different worksheets for each month, and for each month I record costs for different categories of expenditure, with different clients.

    My summary sheet contains a table showing a breakdown - for each category - of the total cost, by month, using a formula like this in each cell:

    SUMIF(Jan!$B$2:$B$2998,"category",Jan!$G$2:$G$2998)

    Now I've gone multi currency and want an extra column in my monthly worksheets showing a currency indicator - $, €, and £ - so that I can have three separate tables on my summary sheet, one for each currency.

    I've tried changing the formula to:

    IF(Jan!$Q$2:$Q$2998="$",SUMIF(Jan!$B$2:$B$2998,"category",Jan!$G$2:$G$2998),)

    ... but it doesnt work. That last example still includes £ values. Can someone please tell me where I am going wrong?

    Is there a simpler way of doing this that doesnt involve having 3 worksheets per month?

    Many thanks.

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

    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
    03-14-2008
    Posts
    3
    I dont want to MULTIPLY the column values, I just want to add up the values (in column G) for each row where the chosen category name is in column B, and the selected currency sign is in column Q.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    SUMPRODUCT function name may confuse.

    NBVC's suggestion does exactly what you ask, although there is some multiplication involved in the calculation ultimately it will add the amounts in column G where your criteria in the other two columns are satisfied.

    Did you try it?

  5. #5
    Registered User
    Join Date
    03-14-2008
    Posts
    3

    Thumbs up

    Quote Originally Posted by daddylonglegs
    SUMPRODUCT function name may confuse.

    Did you try it?
    I have now, and it works fine, was just put off by the name and the fact that Microsoft Help didnt point to it being used in that way. Thanks very much. Never come across that one before.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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