SUMIF in Google Sheets with formula examples

The tutorial shows how to use the SUMIF function in Google spreadsheets to conditionally sum cells. You will find formula examples for text, numbers and dates and learn how to sum with multiple criteria.

Some of the best functions in Google Sheets are those that help you summarize and categorize data. Today, we are going to have a closer look at one of such functions - SUMIF - a powerful instrument to conditionally sum cells. Before studying the syntax and formula examples, let me begin with a couple of important remarks.

Google Sheets has two functions to add up numbers based on conditions: SUMIF and SUMIFS. The former evaluates just one condition while the latter can test multiple conditions at a time. In this tutorial, we will focus solely on the SUMIF function, the use of SUMIFS will be covered in the next article.

If you know how to use SUMIF in Excel desktop or Excel online, SUMIF in Google Sheets will be a piece of cake for you since both are essentially the same. But don't rush to close this page yet - you may find a few unobvious but very useful SUMIF formulas you didn't know!

SUMIF in Google Sheets - syntax and basic uses

The SUMIF function is Google Sheets is designed to sum numeric data based on one condition. Its syntax is as follows:

SUMIF(range, criterion, [sum_range])

Where:

  • Range (required) - the range of cells that should be evaluated by criterion.
  • Criterion (required) - the condition to be met.
  • Sum_range (optional) - the range in which to sum numbers. If omitted, then range is summed.

As an example, let's make a simple formula that will sum numbers in column B if column A contains an item equal to the "sample item".

For this, we define the following arguments:

  • Range - a list of items - A2:A12.
  • Criterion - a cell containing the item of interest - E1.
  • Sum_range - amounts to be summed - B2:B12.

Putting all the arguments together, we get the following formula:

=SUMIF(A2:A12,E1,B2:B12)

And it works exactly as it should: Using SUMIF in Google Sheets

Google Sheets SUMIF examples

From the above example, you may have the impression that using SUMIF formulas in Google spreadsheets is so easy that you could do it with your eyes shut. In most cases, it is really so :) But still there are some tricks and non-trivial uses that could make your formulas more effective. The below examples demonstrate a few typical use cases. To make the examples easier to follow, I invite you to open our sample SUMIF Google Sheet.

SUMIF formulas with text criteria (exact match)

To add up numbers that have a specific text in another column in the same row, your simply supply the text of interest in the criterion argument of your SUMIF formula. As usual, any text in any argument of any formula should be enclosed in "double quotes".

For example, to get a total of bananas, you use this formula:

=SUMIF(A5:A15,"bananas",B5:B15)

Or, you can put the criterion in some cell and refer to that cell:

=SUMIF(A5:A15,B1,B5:B15)

This formula is crystal clear, isn't it? Now, how do you get a total of all items except bananas? For this, use the not equal to operator:

=SUMIF(A5:A15,"<>bananas",B5:B15)

If an "exclusion item" is input in a cell, then you enclose the not equal to operator in double quotes ("<>") and concatenate the operator and cell reference by using an ampersand (&). For example:

=SUMIF (A5:A15,"<>"&B1, B5:B15)

The following screenshot demonstrates both "Sum if equal to" and "Sum if not equal to" formulas in action: Sum if equal to and Sum if not equal to formulas

Please note that SUMIF in Google Sheets searches for the specified text exactly. In this example, only Bananas amounts are summed, Green bananas and Goldfinger bananas are not included. To sum with partial match, use wildcard characters as shown in the next example.

SUMIF formulas with wildcard characters (partial match)

In situations when you want to sum cells in one column if a cell in another column contains a specific text or character as part of the cell contents, include one of the following wildcards in your criteria:

  • Question mark (?) to match any single character.
  • Asterisk (*) to match any sequence of characters.

For example, to sum the amounts of all sorts of bananas, use this formula:

=SUMIF(A2:A13,"*bananas*",B2:B13)

You can also use wildcards together with cell references. For this, enclose the wildcard character in quotation marks, and concatenate it with a cell reference:

=SUMIF(A2:A13, "*"&E1&"*", B2:B13)

Either way, our SUMIF formula adds up the amounts of all bananas: SUMIF formula with wildcard characters

To match an actual question mark or asterisk, prefix it with the tilde (~) character like "~?" or "~*".

For example, to sum numbers in column B that have an asterisk in column A in the same row, use this formula:

=SUMIF(A2:A13, "~*", B2:B13)

You can even type an asterisk in some cell, say B1, and concatenate that cell with the tilde char:

=SUMIF(A2:A13, "~"&E1, B2:B13) SUMIF formula to match an actual asterisk

Case-sensitive SUMIF in Google Sheets

By default, SUMIF in Google Sheets does not see the difference between small and capital letters. For force it to teat uppercase and lowercase characters differently, use SUMIF in combination with the FIND and ARRAYFORMULA functions:

SUMIF(ARRAYFORMULA( FIND("text", range)), 1, sum_range)

Supposing you have a list of order numbers in A2:A12 and corresponding amounts in C2:C12, where the same order number appears in several rows. You enter the target order id in some cell, say F1, and use the following formula to return the order total:

=SUMIF(ARRAYFORMULA(FIND(F1, A2:A12)),1, C2:C12) Case-sensitive SUMIF formula in Google Sheets

How this formula works

To better understand the formula's logic, let's break it down into the meaningful parts:

The trickiest part is the range argument: ARRAYFORMULA(FIND(F1, A2:A12))

You use the case-sensitive FIND function to look for the exact order id. The problem is that a regular FIND formula can only search within a single cell. To search within a range, an array formula is needed, so you nest FIND inside ARRAYFORMULA.

When the above combination finds an exact match, it returns 1 (the position of the first found character), otherwise a #VALUE error. So, the only thing left for you to do is to sum the amounts corresponding to 1's. For this, you put 1 in the criterion argument, and C2:C12 in the sum_range argument. Done!

SUMIF formulas for numbers

To sum numbers that meet a certain condition, use one of the comparison operators in your SUMIF formula. In most cases, choosing an appropriate operator is not a problem. Embedding it in the criterion properly could be a challenge.

Sum if greater than or less than

To compare the source numbers to a particular number, use one of the following logical operators:

  • greater than (>)
  • less than (<)
  • greater than or equal to (>=)
  • less than or equal to (<=)

For example, to add up numbers in B2:B12 that are greater than 200, use this formula:

=SUMIF(B2:B12, ">200", B2:B12)

Please notice the correct syntax of the criterion: a number prefixed with a comparison operator, and the whole construction enclosed in quotation marks. Sum if greater than a specified number

Or, you can type the number in some cell, and concatenate the comparison operator with a cell reference:

=SUMIF(B2:B12, ">"&E1, B2:B12) Sum if greater than a number in a certain cell

You can even input both the comparison operator and number in separate cells, and concatenate those cells:
=SUMIF(B2:B12, E1&F1) Build the SUMIF criteria by concatenating the comparison operator and number.

In a similar manner, you can use other logical operators such as:

Sum if greater than or equal to 200:

=SUMIF(B2:B12, ">=200")

Sum if less than 200:

=SUMIF(B2:B12, "<200")

Sum if less than or equal to 200:

=SUMIF(B2:B12, "<=200")

Sum if equal to

To sum numbers that equal a specific number, you can use the equality sign (=) together with the number or omit the equality sign and include only the number in the criterion argument.

For example, to add up amounts in column B whose quantity in column C is equal to 10, use any of the below formulas:

=SUMIF(C2:C12, 10, B2:B12)

or

=SUMIF(C2:C12, "=10", B2:B12)

or

=SUMIF(C2:C12, F1, B2:B12)

Where F1 is the cell with the required quantity. Sum if equal to

Sum if not equal to

To sum numbers other than the specified number, use the not equal to operator (<>).

In our example, to add up the amounts in column B that have any quantity except 10 in column C, go with one of these formulas:

=SUMIF(C2:C12, "<>10", B2:B12)

=SUMIF(C2:C12, "<>"&F1, B2:B12)

The screenshot below shows the result: Sum if not equal to

Google Sheets SUMIF formulas for dates

To conditionally sum values based on date criteria, you also use the comparison operators like shown in the above examples. The key point is that a date should be supplied in the format that Google Sheets can understand.

For instance, to sum amounts in B2:B12 for delivery dates prior to 11-Apr-2024, build the criterion in one of these ways:

=SUMIF(C2:C12, "<4/11/2024", B2:B12)

=SUMIF(C2:C12, "<"&DATE(2024,4,11), B2:B12)

=SUMIF(C2:C12, "<"&F1, B2:B12)

Where F1 is the target date: Google Sheets SUMIF formulas for dates

In case you want to conditionally sum cells based on today's date, include the TODAY() function in the criterion argument.

As an example, let's make a formula that adds up the amounts for today's deliveries:

=SUMIF(C2:C12, TODAY(), B2:B12) Conditionally sum based on today's date

Taking the example further, we can find a total of past and future deliveries:

Before today: =SUMIF(C2:C12, "<"&TODAY(), B2:B12)

After today: =SUMIF(C2:C12, ">"&TODAY(), B2:B12)

Sum based on blank or non-blank cells

In many situations, you may need to sum values in a certain column if a corresponding cell in another column is or is not empty.

For this, use one of the following criteria in your Google Sheets SUMIF formulas:

Sum if blank:

  • "=" to sum cells that are completely blank.
  • "" to sum blank cells including those that contain zero length strings.

Sum if not blank:

  • "<>" to add up cells that contain any value, including zero length strings.

For example, to sum the amounts for which the delivery date is set (a cell in column C is not empty), use this formula:

=SUMIF(C5:C15, "<>", B5:B15)

To get a total of the amounts with no delivery date (a cell in column C is empty), use this one:

=SUMIF(C5:C15, "", B5:B15) Sum if blank or not blank

Google Sheets SUMIF with multiple criteria (OR logic)

The SUMIF function in Google Sheets is designed to add up values based on just one criterion. To sum with multiple criteria, you can add two or more SUMIF functions together.

For example, to sum Apples and Oranges amounts, utilize this formula:

=SUMIF(A2:A12, "apples", B2:B12)+SUMIF(A2:A12, "oranges", B2:B12)

Or, put the item names in two separate cells, say E1 and E2, and use each of those cells as a criterion:

=SUMIF(A2:A12, E1, B2:B12)+SUMIF(A2:A12, E2, B2:B12) Google Sheets SUMIF formula with multiple criteria

Please note that this formula works like SUMIF with OR logical - it sums values if at least one of the specified criteria is met.

In this example, we add values in column B if column A equals "apples" or "oranges". In other words, SUMIF() + SUMIF() works like the following pseudo-formula (not a real one, it only demonstrates the logic!): sumif(A:A, "apples" or "oranges", B:B).

If you are looking to conditionally sum with AND logical, i.e. add up values when all of the specified criteria are met, use the Google Sheets SUMIFS function.

Google Sheets SUMIF - things to remember

Now that you know the nuts and bolts of the SUMIF function in Google Sheets, it may be a good idea to make a short summary of what you've already learned.

1. SUMIF can evaluate only one condition

The syntax of the SUMIF function allows for only one range, one criterion and one sum_range. To sum with multiple criteria, either add several SUMIF functions together (OR logic) or use SUMIFS formulas (AND logic).

2. The SUMIF function is case-insensitive

If you are looking for a case-sensitive SUMIF formula that can differentiate between uppercase and lowercase characters, use SUMIF in combination with ARRAYFORMULA and FIND as shown in this example.

3. Supply equally sized range and sum_range

In fact, the sum_range argument specifies only the upper leftmost cell of the range to sum, the remaining area is defined by the dimensions of the range argument.

To put it differently, SUMIF(A1:A10, "apples", B1:B10) and SUMIF(A1:A10, "apples", B1:B100) will both sum values in the range B1:B10 because it is the same size as range (A1:A10).

So, even if you mistakenly supply a wrong sum range, Google Sheets will still calculate your formula right, provided the top left cell of sum_range is correct.

That said, it is still recommended to provide equally sized range and sum_range to avoid mistakes and prevent inconsistency issues.

4. Mind the syntax of SUMIF criteria

For your Google Sheets SUMIF formula to work correctly, express the criteria the right way:

  • If the criterion includes text, wildcard character or logical operator followed by a number, text or date, enclose the criterion in quotation marks. For example:

    =SUMIF(A2:A10, "apples", B2:B10)

    =SUMIF(A2:A10, "*", B2:B10)

    =SUMIF(A2:A10, ">5")

    =SUMIF(A5:A10, "<>apples", B5:B10)

  • If the criterion includes a logical operator and a cell reference or another function, use the quotation marks to start a text string and ampersand (&) to concatenate and finish the string off. For example:

    =SUMIF(A2:A10, ">"&B2)

    =SUMIF(A2:A10, ">"&TODAY(), B2:B10)

5. Lock ranges with absolute cell references if needed

If you plan to copy or move your SUMIF formula at a later point, fix the ranges by using absolute cell references (with the $ sign) like in SUMIF($A$2:$A$10, "apples", $B$2:$B$10).

This is how you use the SUMIF function in Google Sheets. To have a closer look at the formulas discussed in this tutorial, you are welcome to open our sample SUMIF Google Sheet. I thank you for reading and hope to see you on our blog next week!

Spreadsheet with formula examples

Sample SUMIF Spreadsheet

Table of contents

125 comments

  1. Hi! I'm trying to use a range of values in a column for my criterion in the SUMIF formula, yet it's only returning the value of the first cell in that column. My formula looks like this:

    | =SUMIF(C2:C, A2:A, B2:B)

    Column C represents items I've "chosen", Column A represents the items that are present to choose, and Column B contains the value of each item respectively. Once again, when I try to use the formula, it only returns the value of the first cell in Column B. Is there a way to fix this?

    • Hi Patrick,

      For me to be able to help you, please share a small sample spreadsheet with us (support@apps4gs.com) with 2 sheets: (1) an example of your source data with your formula (2) the result you expect to get. If you have confidential information there, just replace it with some irrelevant data but keep the format. You can also shorten the table to 10-20 rows. I'll look into and try to help.

      Note. We keep that Google account for file sharing only, please do not email there. Once you share the file, just confirm by replying to this comment. Thank you.

  2. I was wondering the sumif if you could like only count one of the thing instead of it being repeated multiple times such as
    If I have 5 bananas in 5 different cells, could I maybe only count one but still have all the slots highlighted?

  3. please guide master

    =IFERROR(SUM(IF(P2:P5006=”Ya”;0;2);IF(Q2:Q5006=”Ya”;0;2);IF(R2:R5006=”Ya”;0;2);IF(S2:S5006=”Ya”;0;2);IF(T2:T5006=”Ya”;0;2);IF(U2:U5006=”Ya”;0;2);IF(V2:V5006=”Ya”;0;2))/7;FALSE)

    when I use this formula in excel, this formula works fine (successfully), but when I use it in a spreadsheet, with the addition of the arrayformula function it doesn't work properly, when I fiddle with it, it gives an error. please guide master. as well as an example. Thank You

    below is the formula that I use on Spreadsheet

    =arrayformula(if(row(A:A)=1;”SKOR KELAYAKAN RUMAH”;ArrayFormula(IFERROR(SUM(IF(P2=”Tidak”;2;0);IF(Q2=”Tidak”;2;0);IF(R2=”Tidak”;2;0);IF(S2=”Tidak”;2;0);IF(T2=”Tidak”;2;0);IF(U2=”Tidak”;2;0);IF(V2=”Tidak”;2;0))/7;””))))

    thank you

  4. I am trying to add a specific word into the formula but from a separate TAB of the google sheet, this is the formula that is current

    =sumif('BET HISTORY'!A:A,B8,'BET HISTORY'!G:G

    HOWEVER i have 2 sports in that sheet that i am trying to separate, which are AFL and NBA but i can not seem to add the word into the formula and make it work

      • Yep, tried both, is it because I am trying to post the results of the formula into a separate TAB?
        It either goes to 0 or ERROR

        So in summary, what I am trying to do, is post results from 2 different sports for each specific day, atm when you enter the date, it calculates both sports combined and I am trying to separate that, but I can not figure out how to, am I able to post a photo of what I am trying to get to work?

        • No, having the formula in a separate tab doesn't break it. Besides, your sheet references look good.

          Feel free to share an editable copy of your spreadsheet with us: support@apps4gs.com. It'll be greate if you include a sheet with the result you expect to get (it often gives a better understanding than any text description). I kindly ask you to shorten the tables to 10-20 rows.

          Note. We keep that Google account for file sharing only, please do not email there. Once you share the file, just confirm by replying to this comment.

          I'll look into it and do my best to help.

          • I have just sent a editable copy, thank you for your help !

            • Thank you for sharing the file, Joshua.

              However, it's a spreadsheet that i can view only. I've requested editing permissions. Also, for a more precise result, please enter your formulas (without anything else in cells) where you need them exactly in the file. Thank you.

              • I have just gave you permission, and i have edited the tab to show where i want the info

              • Thank you, Joshua.

                I've entered the formulas that should help you in the NBA Results sheet. You'll just need to create similar ones for AFL on the corresponding sheet.
                When it comes to dates, use SUMIFS instead.

                Hope this is what you need :)

              • Perfect! That one works! entered a very similar formula in E8 under "Profit/Loss" but it is reading every day as 0.00 is there anything in the formula that i have done incorrect from what i can see it should work

              • Do not worry i figured it out! thank you so much for your help :) you are awesome!

  5. I have so enjoyed the instructions above. Is it possible in Google Sheets to have an automated cell that enters a certain amount every month on a certain day. I have built a spreadsheet for our church finances and every month, there needs to be a transfer between accounts. It would basically be dated that on the 15th of the month, I want a cell to automatically populate with a certain amount (500.00). I have 12 sheets, one for each month of the year.

    Thank you so much,
    Brent

  6. I have got it working with semi-colons in the parentheses, NOT using commas!

    • Hi Driek,

      This depends on your spreadsheet locale actually (File > Spreadsheet settings). Some require commas, others – semicolons :)

  7. What if the total cells i have my data on to check is not fixed.

  8. How can I do this but instead of the sum being a range (B3;B10) it would be an actual calculation (B3+150)?
    So IF the range, IS a DATE, THEN calculate the SUM (SUM is calculated as soon as the user enters the date)

    =SUMIF($B$5:$B$54,ISDATE(B7),(C6+$G$1))

    The closest I can get is:
    =IF($B$5:$B$54,ISDATE(B9),SUM(C8+$G$1))
    which returns TRUE instead of the SUM.

    Thanks!

  9. hi im wondering if you could help me with this formula
    A= Date, B=Amount, D= category
    =SUMIF (D:D, "",B:B)
    this formula works great for grabbing everything in D an giving me a total, but what if i only want to include specific months, to give me a monthly total of expenses.
    i tried
    =SUMIF(ARRAYFORMULA(FIND( A:A,"*Jul*")),+sumif (D:D, "",B:B))
    an it come out as 0
    i tried
    =SUMIF(A:A,"*Aug*",B:B)+SUMIF(D:D,"",B:B)
    but that just added the 3 entries i have for august plus the total of the items listed in D
    id basicly like..... A (date) + D (category) = B (total "month" expences)

  10. i want to sum value of another column based on multiple matching value in a single column

  11. i am tracking disbursement checks. i have a simple Sum(L:L) for a total of that column. my new issue is i now got some capital back and it throws my profit percentages way off.
    Question: the data is filtered to always show most recent checks at the top. how could i Sum the check amounts (column L) only from the lines above where it says return of capital in Column O?

    • Hello Nathan,

      Sorry but your description is a bit confusing. Please consider sharing an editable copy of your spreadsheet with us (support@apps4gs.com) with 2 sheets: (1) a copy of your source data (2) the result you expect to get (the result sheet is of great importance and often gives a better understanding than any text description). I kindly ask you to shorten the tables to 10-20 rows.
      I'll look into it and do my best to help.

      • figured it out. temporarily
        =SUM(INDIRECT("L1:L" & MATCH("Return of Capital",O:O,0)-1))

        i need to add this manually when there is a return or else it errors saying no return found. i think i am good for now.

  12. I am trying to total several rows of "Auto - Repair", Auto - Gas", "Auto - Car Washes" for each month. Auto - Repair may have 5 rows, Auto - Gas may have 10 rows, etc.

    I'm using the formula: =SUMIF(A3:A78,"auto - repairs",B3:M78) and it is picking up the total for the entire A3:A78 entries for the month of January. Another total is picking up just the month of January for, say the specific Auto - Car Washes, when using the same formula (clicked and dragged - B3:M78 to total all entries)

    • Hello Toni,

      I'm sorry but the problem you're having is unclear. For me to be able to help you, please share a small sample spreadsheet with us (support@apps4gs.com) with 2 sheets: (1) an example of your source data with formulas (2) the result you expect to get. If you have confidential information there, just replace it with some irrelevant data but keep the format.

      Note. We keep that Google account for file sharing only, please do not email there. Once you share the file, just confirm by replying to this comment. Thank you.

      • I think I may have stumbled upon the correction. I was using the formula:

        =SUMIF(A3:A78,"Auto - Mercer Auto Body",C3:C78).

        I removed and it seems to have picked up the total of all Auto - Mercer Auto Body listed. I can also add a row and it will include the new amount in the total.

        Thank you!

        • Your comment doesn't say what you removed exactly, but I'm glad you've found the solution! Feel free to stop by our comments anytime :)

  13. Hi,
    Trying to work out the correct formula to use -
    I have a spreadsheet where I input a number of products ordered.
    If 5 or more are ordered the percentage added decreases.
    Please can you assist with what formula (if possible) I would use to do the first 5 products @ percentage 1 + additional products ordered @ percentage 2 ?

    So the product line would for example show 7 products, the first 5 I want at the higher percentage, the remaining 2 at the lower percentage and then totalled.

    I thought a secondary line would need to be added and totalled, then to add them together.

    TIA

    • Hi Hols,

      For me to understand your task better, please share a small sample spreadsheet with us (support@apps4gs.com) with 2 sheets: (1) a copy of your source data (2) the result you expect to get. I kindly ask you to shorten the tables to 10-20 rows. If you have confidential information there, you can replace it with some irrelevant data, just keep the format.

      Note. We keep that Google account for file sharing only, please do not email there. Once you share the file, just confirm by replying to this comment.

  14. I have been over this several time and used it in many ways it's great.
    But I have one question I cannot figure.
    I have several columns that could have a number in them (Different bank accounts) that payment could have gone out of for the purchase of apples. is there a way of grouping these columns?
    ie =SUMIF(B:B,B2,(E:E+H:H+K:K+L:L))

    • Hello Steve,

      If you want to sum multiple ranges based on the same criteria, you should add up several SUMIF formulas, like this:
      =SUMIF(B:B,B2,E:E)+SUMIF(B:B,B2,H:H)+SUMIF(B:B,B2,K:K)+SUMIF(B:B,B2,L:L)

  15. Made it to the end, great tutorial! :)

  16. I must have not been thinking clearly - I had the results in quotes, "35" in the previous IF statement. When I change the "35" to 35, then it is a number.
    So sorry for the confusion there.

    • Hi Charlie,

      Don't be sorry, Google Sheets functions are really confusing sometimes :) I'm happy to know you pinned down the problem :)

  17. I am trying to use the SUMIF formula to add numbers in a very similar manner to the 1st example with the bananas. However, the column with the range to be added is derived from a formula that puts the dollar amount in the cells to be added. If I remove the formulas, and place a dollar amount in the cells, it works. If the formula is in the cells to determine the values, I get all 0's for my amounts. Any ideas?

    • Hello Charlie,

      Would you mind sharing an editable copy of your table with us (support@apps4gs.com)? I kindly ask you to shorten the table to 10-20 rows.
      Note. We keep that Google account for file sharing only, please do not email there. Once you share the file, just confirm by replying here.
      I'll look into it. Thank you.

      • Yes, I can do that later today. However, I did find a workable solution. What I had to do in the reference cell was to change the If statement result to be 1*35 to make it an actual number instead of just making the result "35". This made the result an actual number to be calculated. I couldn't even get the =Sum(A5:A13) to add them up, as they were text and not numbers. I had even tried to format as numbers with no results.

        I am sure that there other ways to accomplish the same goal.

  18. Hi, firstly thanks for the great posts. They've got me further than I was. I've got stuck however and hope you can help me out. It may be I'm using the wrong type of formula but I can't find anything that describes exactly what I want and SUMIF seems closest.

    I want to work out the total of a column (H) but only if the value of one cell (H19) is 10 or more (this cell is a COUNTIF formula). I can kind of get it working but the result only gives me the value for the first cell of (H), rather than the whole column.

    This is the formula I have been trying to use: =SUMIF(H19,">="&10,H2:H15)

    Any help is much appreciated!

      • Hi Natalia,
        I figured that might be the case but couldn't work out what the alternative was to make it work. Your suggested forumla worked perfectly, thanks very much!

  19. How do this in Google Sheets?
    pseudo
    =IF C10 is not (empty/blank/Null)
    and D10 is not (empty/blank/Null)
    SUM E9+C10-D10

    thanks, Ohashi

    • Hello, Ohashi - and anyone reading this post -
      I'm positive that by now you have solved this formula.
      I would be appreciative if someone could reply as to what the correct formula is for this inquiry.
      Thank you!
      ~S.

  20. I am attempting to use SUMIF in a referenced sheet and am running into an error. Would someone be able to assist me or post an example on how to do this? :)
    =SUMIF(importrange(hyperlink(C4),"Sheet1!$D$1:$D$50"),"=PCO-B",importrange(hyperlink(C4),"Sheet1!$W$1:$W$50"))

      • Thanks Natalia for the quick response. Unfortunately, the number of times I need to do this does not warrant new tabs. I will have to explore the query method.

  21. Great post!
    Solved my issues with SUMIF + OR

  22. Hi,
    how to combine not equal to something and blank cells in Sumif function?

  23. I have a dollar value in cell D3 that the range can vary. In cell I3, I want to populate either a "0" a "50" or a "100" depending on the value in D3. If the value in D3 is 00 or less then I3 should populate a 0, if it is .01 to 599.99 then I3 should populate 50. Anything over 600 should populate a 100. What is the formula I should be using in I3?

  24. Hi,
    Hope u all are safe from Corona.
    Lets explain my problem.
    I have two column A & B. I want sum like increasing A.
    For example,
    B2 is sum of A2,
    B3 is the sum of A2:A3 &
    B4 is the sum of A2:A4. Waiting for a solution.

    Thanx in advance.

    • Hello!
      Please use the following formula in B2
      =SUM($A$2:A2)
      After that you can copy this formula down along the column.
      I hope it’ll be helpful.

  25. Look down here and figured out how to write a formal I wanted, I was doing everything right and was utterly confused why I was not getting the sum of one of my items in my left column.. this may be a newbie mistake but some of the labels in my left column had a space in front of them which caused the formula to not catch them so it worked on "supplies" but not "supplies " hope you guys avoid this mistake ! Thanks for the great information

  26. Hello again,

    I have shared with you a spreadsheet that I am needing assistance with. You will see on the first tab (Acevedo) at the bottom is a chart next to "Unit Bonus". I need the bonus to populate according to the unit number in E1 compared to the chart. If the number in E1 is lower than it should return $0. I shared it with you, it's called PRACTICE 2020 Sales Sheet.

    THank you

    • Hello again, Kevin,

      I'm sorry but I don't see a chart on the Acevedo sheet. There are only rows of numbers in a few columns which I'm not sure how and where to apply. I kindly ask you to double-check and edit the data so it becomes clear.
      Also, you wrote: "If the number in E1 is lower than it should return $0". Please specify what records should E1 be compared to. You will then be able to test your condition using the IF function.

  27. This is my SUMIF formular - =SUMIF(A2:A27,A35,I3:I27)
    I get a formular Parse Error. the ranges are only highlighted in colours if I put a space between the range and the Criterion. However, even with the space and the ranges highlighted in their colours I get the same error. Any ideas?

    Thanks
    Dave

    • Hello David,

      Your formula works correctly on my end. If you're still getting issues, please make sure you're formatting your formula as your locale requires (e.g. it may need a semicolon instead of a comma, just pay attention to formula suggestions). If it still doesn't work, consider sharing an editable copy of your spreadsheet with us (support@apps4gs.com). When sharing, make sure the option 'Notify people' is checked.

      Note. We keep that Google account for file sharing only and don't monitor its Inbox. Please do not email there. Once you share the file, just confirm by replying here.

      I'll look into it and try to help.

  28. I am trying to calculate a numerical figure to a cell based off of 4 different values.

    Essentially, i need
    if x = full, y= 5000 or if x = 3/4 full, y =3750

    Should be pretty easy. Just keep getting error.

  29. Hi! Thanks for all the useful bits. I'm still stuck trying to get a correct formula for SUMIF. I'm pulling data from another sheet and want to sum for a specific range of dates (one month). So far I have =SUMIFS(MYERS!$C:$C, "'MYERS!'C:C">="DATE( 2019,09,01) , 'MYERS!'C:C"<="DATE( 2019,09,30)", MYERS!Q:Q)

    BTW, MYERS! is the name of the sheet I am trying to pull from. The C column has the dates that I'm looking for and the Q column is what I'm trying to add.

    • Hi, Sarah,

      If I understand your task correctly, this should help:
      =SUMIFS(MYERS!$C:$C,MYERS!$Q:$Q,">="&DATE(2019,9,1),MYERS!$Q:$Q,"<="&DATE(2019,9,31))

  30. >0.61<0.9
    How to use this condition Sumif formula

  31. Hi,

    I'm using Color as criterion in the formula but it doesn't work. Am I doing something wrong?
    Thanks for your help.

    Andrea

    • Hello!

      The calculation is correct. Only two dates (C5 and C6) are less than the date in B1. The sum of numbers in column B in the same rows is 700.

  32. I am trying to sum a range of cells that are in the same sheet but on a different tab. They need to meet the criteria of a specific accounting code and then add then sum the amount from another cell if they meet the criteria. The formula I am using says I have a Formula parse error. Can you tell what I am doing wrong?
    =SUMIF(‘JULY 2019’!B2:B17,"=6230-30",’JULY 2019’!A2:A17)

    • Hello Carrie,

      your formula contains curly single quotes in sheet references. Try replacing them with straight ones:
      =SUMIF('JULY 2019'!B2:B17,"=6230-30",'JULY 2019'!A2:A17)

  33. Is there a way to summarize all the cells in the found rows after executing a filter? Seems like there should be a way to do that. Is there something like a "found set" that can be used were you need to specify a range?

    • Jim,

      no, Google Sheets will add up all cells, filtered as well.
      I should say that the SUMIF function works like the filter itself. If you specify what conditions you use to filter your data, we'll be able to suggest the correct formula.

  34. hello, I am trying to use a sumif where I am referencing a different sheet, within the formula the sum range is B:W (a square of a range) and the text turns a color indicating that it is a correct formula but will only return 0. The range to sum does contain blanks, is this the problem? When I choose the range containing the numbers for that specific criterion it does sum the numbers. thanks

  35. Hello,

    I am attempting to use SUMIF in the following way:

    Sheet1 has 488 rows of numerical data, with header data in the first row. I am trying to create a summary on Sheet2. I want to list each Column Header from Sheet1 with the sum of the values in that Column.

    On Sheet2, I have copied over the Column Headers into Column A, and want to include their Cell Reference for my criteria.

    Here is what I have tried:
    =SUMIF('Sheet1'!$G$1:$S$488,$A10,'Sheet1'!$G$1:$S$488)
    Where $A10 is the cell containing the first Column Header I want to look up.

    Even though my SUMRANGE is the same size as RANGE, it is still only returning the sum value for the 2nd row of data on Sheet1 (directly below the header row).
    Am I on the right track or do I need to use a different function?
    Many thanks for any assistance!

    • Hello Meg,

      Thank you for your question.

      Your task looks interesting but it's quite difficult for me to reproduce exactly what you got. Could you please share a sample spreadsheet with us (support@4-bits.com)? You can replace some important info with irrelevant data and shorten the table if you'd like.
      Once you share the table, please confirm by replying here.

      Thank you.

  36. I tried using what you wrote in the "SUMIF formulas with wildcard characters (partial match)" section and I keep getting 0.

    The formula works just fine with actual characters, but once I swap any of them with the "?" wildcard it always returns 0.

    • My bad, I didn't know I have to use date(yyyy,mm,dd) if working with dates.

      It does seem to be the case that wildcards don't work within that formula though.

  37. Hi Svetlana,
    Thank you very much for writing and sharing such an excellent guide to using SUMIF in Google Sheets. It greatly improved my ability to analyze my data. After a good bit of searching, it was the only tutorial I found that provided the knowledge I needed in a manner that not only showed me how to write the formulas but enabled me to fully understand the concepts behind the formula. Of-course I stopped looking once I found yours, but I have a hard time imagining there is a better one out there.

    I really liked how you structured this tutorial. It was a perfect mix of concepts and examples. The progression from simple to more complex cases made it possible for me to understand and implement the more complex scenarios. Well done!

    I'm looking forward to your tutorial on SUMIFS!

  38. You nailed it, answered my question quickly, thanks!

  39. Can you add a note that when testing for equality, you don't need to specify a comparison operator?

  40. I'm trying to use this formula to put a value in a cell on a tab called 'overview' that calculates the sum of entries in column c of a tab called 'visit reports' that contain the word school in column b of the 'visit reports' tab. =SUMIF ('Visit reports'!B1:B300, "*school*",C1:C300). It is returning zero even when I have values in both column b and c. The sheet is at https://docs.google.com/spreadsheets/d/1PQFS5_fkhGGfR_2TcAudT9KKE98s8oq0L8zlcES3mNo/edit?usp=sharing. Can anyone help?

    • Wondering if you need to put the sheet name with the sum range too.
      Looks like you managed to figure it out though.

    • Hi.. were you able to figure out how to solve this? Can't get access into the sheet..

  41. Hi!
    I would like to know if there are some optimisations about SUMIF.
    I mean, is the order of criteria important for the SUMIF? (stop the check when a criterion is false) For the very massive sheets, could be interesting.
    Thank you.

  42. This is useful...However, I am looking to create a sheet that has buyer numbers and the costs of what they bought in it. So I will sort by buyer number and then want to sum what they owe. How do I use the SUMIF when I don't know what the criteria is (if buyer #2 bought 3 items, I want to sum those three columns; then if buyer # 3 bought 6 items, I want it to sum those 6 columns) I don't know how many items they will have bought. I hope that makes sense.... thanks!

  43. Hi,

    Indeed, helpful. Thank you. But i would like you to help me to use sumifs between two or more sheets. Thanks.

  44. How to do reference from a different sheet itself?

    • Thank you for your question, Aneesh.

      To reference a cell/range from another sheet, first enter the required sheet name wrapped in single quotes, then put an exclamation mark (!), and then enter the range you refer to, for example:
      =SUMIF('Sheet2'!B15:B26,">20")

  45. thanks a lot for these great tips!

  46. Thanks a lot! this is very useful

  47. Very thorough tutorial. Love it! I've been trying to get a simple SUMIF to work and have it reference columns on another tab but Sheets does not seem to like this. Have you been able to get it to work?

    Thanks!

    ex.

    Tab to be referenced in the same sheet is called "Joint Chequing".

    =SUMIF('Joint Chequing'!C2:C1001, A1, 'Joint Chequing'!D2:D1001)

  48. Please notice that I would like to have more of Excel Tutorial in lesson, because what I'm during now is very helpful to me

    I'm learning an lot from theses lesson that I bring up off your system. I appreciate Excel and the lesson's that are giving to me when I'm uploading theses tutorial

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)