Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Pavel Andreea la Simpatie.ro
Femeie
24 ani
Vrancea
cauta Barbat
28 - 49 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] SUMIFS and Exclude Range of Values Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 8 ani
Postari: 916
You normally do a SUMIFS like this, right?

=SUMIFS(
  M$102:M$154;
  $G$102:$G$154;"<>Supplier 1";
  $G$102:$G$154;"<>Supplier 2";
  $I$102:$I$154;$I90
)


How about if you want to add 5 more suppliers?
You go for more advanced functions instead of hardcoding them in SUMIFS.

A short solution would be:

=SUM(
  FILTER(
   $M$102:$M$154;
   (ISNA(MATCH($G$102:$G$154;$G$90:$G$96;0))) *
   ($I$102:$I$154=I90)
  )
)


A more advanced solution with LET:

=LET(
    suppliers; $G$102:$G$154;
    values; M$102:M$154;
    category; $I$102:$I$154;
    exclusions; $G$90:$G$96;
    SUM(
        FILTER(values;
               (ISNA(MATCH(suppliers; exclusions; 0))) *
               (category=$I90)
        )
    )
)


pus acum 4 luni
   
TRaP
Moderator

Inregistrat: acum 8 ani
Postari: 916
Another way you could do a SUMIFS is by using a SUM instead and multiplying with conditions.

This works especially if you want to sum values in your sum_range with conditions from individual cells.
SUMIFS will error in such cases, because it requires the sum_range and all the criteria_ranges to have the same number of cells.

For doing the conditional sum, you can either use

=IF(AND($G7="condition 1";$H7="condition 2";$J7="condition 3"); SUM($L7:$T7); 0)


Or you can use the more elegant solution:

=SUM($L7:$T7) * --($G7="condition 1") * --($H7="condition 2") * --($J7="condition 3")

because --TRUE = 1 and --FALSE = 0


pus acum 1 luna
   
Pagini: 1  

Mergi la