Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• Multi-Conditional Count/Sum:
(Count)
Synt. =SUMPRODUCT(--(Rng_1=Val1), --(Rng_2=Val2))
(Sum)
Synt. =SUMPRODUCT(--(Rng_1=Val1), --(Rng_2=Val2), Rng_to_Sum)
Important: All ranges must be of equal size. Also, cannot use whole-column ranges such as A:A.
Note: Multi-Conditional Count and Sum can be accomplished with a Pivot Table but for dynamic
spreadsheet design these formulas are excellent (but memory hogs.) Also, up to 30 conditions
when counting, 29 conditions when summing (plus one range to sum.)
(Alpha)
ex. =INDEX(A:A,MATCH(REPT(“z”,255),B:B))
Note: This technique is important for faster formula calculation, as in when performing multi-
conditional Counts and Sums because you want to use the smallest range possible. Also, aids in
dynamic spreadsheet design because the ranges don’t need to be manually altered.
ex. =SUMPRODUCT((A2:A100<>"")/COUNTIF(A2:A100,A2:A100&""))
Note: Use the smallest range possible due to slow calculation times. See Using Last Used Row in
a Formula above.
Advanced cont.
• Multi-Key or Multi-condition VLOOKUP (will also work for the INDEX/MATCH comb.)
1. Create a column in your Lookup table and concatenate the values you wish to look up (must
be the column furthest to the left of the data to return if using VLOOKUP.)
2. Now you can look up multiple keys using the following formula as an example:
Synt. =VLOOKUP(key_1 & “@” & key_2, Rng_to_Lookup, Col_Ind, [0 or
1])
ex. =VLOOKUP(A1&”@”&B1,Sheet1!A:C,3,0)
Note: There is a “@” in the middle of the two keys/conditions. This is to avoid errors such as
concatenating two different records that form the same value. For instance 12A and BC equals
12ABC; 12 and ABC equals 12ABC. Two very different records equal the same key when
concatenated. Using the “@” between the keys helps avoid this error.