Forum Discussion
Automatiser une tache en utilisant somme.si
- Jul 18, 2021
Belsam_mzh Okay! That complicates the matter. I would put all ID's and Values in one list with an extra column for the Q-Ex-number. Then separate and focus on all IDs that exist more than three times. Remove the duplicates (i.e. where ID-1 & Q-1 equals ID-2 & Q-2). Then you are (probably) left with no more than three IDs, that you can re-join with the other data. Now you can do the SUMIF formula (SOMME.SI) as there will not be any ID with more than 3 occurrences.
Not something you do in one simple formula, I'm afraid. At least, not one I can think of right now. Personally, I would use PowerQuery. Although not difficult to learn, perhaps a bit overwhelming since you mention to be new to Excel.
Have added a few chaat to your file demonstrating the steps you may have to do. Use only a very small portion of the data though.
Belsam_mzh Perhaps like in the attached file?
- Riny_van_EekelenJul 17, 2021Platinum Contributor
Belsam_mzh Sorry, don't understand the question. What would you like see in column I?
- Belsam_mzhJul 18, 2021Copper Contributor
Riny_van_Eekelen Pour la colonne I je veux calculer la somme des débits Q_EX1 et Q_EX2 si les identifiants ID_EX1 et ID_EX2 égalent ID_noeud. J'ai travaillé avec la formule "=SOMME.SI(D:D;H3;E:E)+SOMME.SI(F:F;H:H;G:G)", le problème est Id_noeud peut apparaitre plus que 3 fois entre ID_EX1 et ID_EX2 s'il est le cas donc il existe des Q_EX1 et Q_EX2 qui sont égaux et je dois compter pour la somme soit Q_EX1 soit Q_EX2. Vous trouvez deux exemples dans ce fichier.
- Riny_van_EekelenJul 18, 2021Platinum Contributor
Belsam_mzh Still don't understand what you are talking about. By the way the formula in K7 seems to be wrong it sums two different ID's.
A formula like:
=SOMME.SI(D:D;H3;E:E)+SUMIF(F:F;H3;G:G)
in J3 will SUM values from columns E and G where the IDs in columns D and F match the for ID in column H.