Organize information

Build an Excel conditional summary formula

Create a SUMIFS, COUNTIFS, or AVERAGEIFS formula from explicit criteria

5 min setupTested with:ChatGPTReviewed: 2026-08-28
1

Add your context

Your text stays in this browser. AILesson Prompts does not send it to a model or server.

2

Your prompt

Unfilled fields remain visible as placeholders, so you can still copy and edit the prompt

Create an Excel conditional summary formula.

Question:
[question]

Table layout:
[layout]

Criteria and boundary rules:
[criteria]

Choose SUMIFS, COUNTIFS, AVERAGEIFS, or another standard function only after defining the aggregation and each criteria range. Use equal-sized ranges and real Excel dates. Explain wildcard behavior and whether blanks, errors, hidden rows, and duplicate records are included. Return a structured-reference formula when a table name is supplied, a cell-range alternative, and four test cases including a date boundary and a no-match result.
Private by defaultPrompt assembly happens locally in your browser. Avoid placing confidential information into any AI service unless your organization allows it.

From input to outcome

A worked example

See how concrete context turns this recipe into a usable result

Actual input

Summary question
Sum net revenue for completed online orders in June 2026 for the East region.
Table layout
Excel Table named Orders with columns OrderDate (date), Region (text), Channel (text), Status (text), and NetRevenue (number).
Criteria and boundary rules
Include 1 June through 30 June 2026. Region, Channel, and Status must be exact matches. Exclude cancelled or blank statuses naturally by requiring Completed. Duplicate rows are data errors and are not automatically removed.

Example output

Use SUMIFS because one numeric field is summed under multiple row-level conditions.

Table formula =SUMIFS(Orders[NetRevenue],Orders[OrderDate],">="&DATE(2026,6,1),Orders[OrderDate],"<"&DATE(2026,7,1),Orders[Region],"East",Orders[Channel],"Online",Orders[Status],"Completed")

Using “less than 1 July” includes every time on 30 June even if OrderDate contains timestamps. Text criteria are exact apart from Excel's usual case-insensitivity. Blank and cancelled statuses do not match Completed. Hidden rows are included; duplicate rows are also included and must be checked separately.

Range version: if rows are 2–1000 and columns A:E follow the stated order, use =SUMIFS($E$2:$E$1000,$A$2:$A$1000,">="&DATE(2026,6,1),$A$2:$A$1000,"<"&DATE(2026,7,1),$B$2:$B$1000,"East",$C$2:$C$1000,"Online",$D$2:$D$1000,"Completed"). Test 1 June, a normal June row, 30 June 23:00, and a no-match subset against manual totals.

Why this works

  1. 1

    Separating the value range from each criteria range prevents shifted-range errors.

  2. 2

    Explicit date boundaries avoid silently excluding the last day of a reporting period.

Check the result

  • Are every sum and criteria range the same size?

  • Are start and end dates inclusive exactly as intended?

  • Does a manual subtotal for a small sample match the formula?

More ways to explore

Where this recipe fits

Keep the work moving