Conditional Aggregation
Scorri per mostrare il menu
SUMIFS
SUMIFS reads left to right: first you tell it which column to add up, then you give it one or more condition pairs — a column to check and a value to match. Every pair you add narrows the result further. The function only adds a row's value when every condition is satisfied simultaneously, which makes it AND logic by default.
=SUMIFS(sum_range; criteria_range1; criteria1; criteria_range2; criteria2; ...)
=SUMIFS(D:D, B:B, "Dining")
When using comparison operators as criteria, wrap the entire condition in quotes: ">100", "<=50", "<>0". Writing >100 without quotes causes an error.
COUNTIFS
COUNTIFS shares the exact same structure as SUMIFS with one important difference: there is no sum range. You start immediately with condition pairs, because the function is not adding values — it is simply counting how many rows satisfy the criteria. This makes it slightly shorter to write, and it works on any column type, including text columns that SUMIFS would not be able to add.
=COUNTIFS(range1; criteria1; [range2; criteria2]; ...)
=COUNTIFS(G:G; "Variable")
Both functions apply AND logic across multiple conditions — every condition must be satisfied for a row to be included. There is no built-in OR mode; for OR behaviour you need to sum two separate SUMIFS results.
Grazie per i tuoi commenti!
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione