Home โ€บ Office work โ€บ Excel Sum Only 'Done' Rows: Ask AI for the SUMIF Formula

Excel Sum Only 'Done' Rows: Ask AI for the SUMIF Formula

When this happens

You track tasks in Excel. Column B says 'Done' or 'In progress', and column C has the amount. You want a total for the finished work only, but you're not sure which function does that. You don't need to know the function name. Just tell the AI what's in each column and what result you want.

Watch the video

Ask like this

In Excel, column B says 'Done' or 'In progress' and column C has amounts. Give me one formula that sums C only where B is 'Done', and tell me where to put it.

The answer we got

Example AI chat
YouIn Excel, column B says 'Done' or 'In progress' and column C has amounts. Give me one formula that sums C only where B is 'Done', and tell me where to put it.
AIPut this formula in an empty cell where you want the total (for example, E1):=SUMIF(B:B,"Done",C:C)It adds up the amounts in column C only for the rows where column B says "Done".
Example: total of column C where column B is 'Done'
1A TaskB StatusC Amount
2Write reportDone$1,200
3ResearchIn progress$800
4Prep meetingDone$500
5Revise designIn progress$700
6Send quoteDone$300

โœ… Put =SUMIF(B:B,"Done",C:C) in E1 and you get $2,000 (the total of the 3 Done rows).

Tips for better results

  1. Two conditions? Use SUMIFS

    To total rows that are 'Done' and also named 'Write report', use SUMIFS. Unlike SUMIF, the column you're adding up (C:C) goes first.

    =SUMIFS(C:C,B:B,"Done",A:A,"Write report")
  2. Getting 0? Check for spaces and typos

    If a cell says 'Done ' with a space at the end, or the word is spelled a little differently, SUMIF skips it. Use TRIM in a spare column to see the cleaned-up value, or ask the AI to 'make it work even if there are extra spaces.'

    =TRIM(B2)
  3. Count the Done rows with COUNTIF

    To count how many tasks are done instead of adding up amounts, use COUNTIF. With the example table above, it returns 3.

    =COUNTIF(B:B,"Done")

Today's checklist

FAQ

Does the same formula work in Google Sheets?

Yes. SUMIF, SUMIFS and COUNTIF work the same way in Google Sheets. Add "in Google Sheets" to your prompt and the AI will tailor its answer.

Is it OK to use whole columns like B:B?

Yes. With whole columns you can add rows later without editing the formula. Just don't put the total inside column B or C, or the formula ends up including itself. Use an empty cell in another column, as in the example.

โ€น All Office work guides

AI answers can vary by service and version. Double-check anything important before you use it.

Works in ChatGPT, Claude or Gemini.