+ Reply to Thread
Results 1 to 6 of 6

SUMIF and SUM query

  1. #1
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    SUMIF and SUM query

    Hi,

    I'm trying to workout why I am getting an error with the below formula. I get a 'there's a problem with this formula'.

    Please Login or Register  to view this content.
    Can someone help me with the error?

    Many thanks in advance

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: SUMIF and SUM query

    The syntax for SUMIF is:

    SUMIF(criteria_range, criteria, sum_range)

    I presume you are looking in column AE of the Raw_data sheet to see if cells in that column are equal to XX, but then the rest of it is not a range, so it doesn't make sense to Excel.

    I think you need to explain what yo are trying to do.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: SUMIF and SUM query

    Hi Pete,

    many thanks for your response.

    I wanted to do the sum (sum_range) only if the column AE = XX. They are all on the same sheet (corrected to Sheet1).

    In essence, sum of one countif - sum of the other countif, but only if AE = XX.

    Please Login or Register  to view this content.
    Hope that makes more sense.

    Many thanks in advance.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: SUMIF and SUM query

    You can use COUNTIFS to do that, which allows you to specify more than one condition, like this:

    =COUNTIFS('Sheet1'!D:D,"<"&Charts!Q1,'Sheet1'!AE:AE,"XX") - COUNTIFS('Sheet1'!AF:AF,"<"&Charts!Q1,'Sheet1'!AE:AE,"XX")

    Hope this helps.

    Pete

  5. #5
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: SUMIF and SUM query

    Fantastic!!

    Thank you so much, that worked perfectly.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: SUMIF and SUM query

    You're welcome - thanks for the rep.

    Pete

+ 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. Possible SUMIF query? Not sure!
    By ducks88 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2016, 06:19 AM
  2. =Sumif Query
    By Orthodoxyn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2013, 04:56 AM
  3. Countif Query & sumif query help
    By masond3 in forum Excel General
    Replies: 4
    Last Post: 11-16-2011, 03:42 AM
  4. sumif query & countif query help
    By masond3 in forum Excel General
    Replies: 1
    Last Post: 11-15-2011, 06:56 PM
  5. SUMIF Query
    By Branno in forum Excel General
    Replies: 1
    Last Post: 07-04-2010, 09:28 PM
  6. [SOLVED] Sumif Query
    By gibz in forum Excel General
    Replies: 3
    Last Post: 07-02-2006, 06:25 PM
  7. SumIf query ...
    By muchacho in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 06-28-2006, 04:53 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