Automatiser une tache en utilisant somme.si

%3CLINGO-SUB%20id%3D%22lingo-sub-2559010%22%20slang%3D%22fr-FR%22%3EAutomate%20a%20task%20using%20somme.si%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559010%22%20slang%3D%22fr-FR%22%3E%3CP%3EHello%20community%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20new%20to%20Excel%20and%20I%20try%20to%20create%20a%20formula%20to%20look%20for%20a%20value%20in%20an%20array%20and%20then%2C%20if%20it's%20there%2C%20give%20a%20result.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20file%2C%20ID_EX1%20and%20ID_EX2%20are%20the%20identifiers%20of%20the%20nodes%20and%20they%20represent%20the%20ends%20of%20the%20pipes.%20Q_EX1%20and%20Q_EX2%20are%20the%20flow%20values%20corresponding%20to%20ID_EX1%20and%20ID_Ex2%20respectively.%20Id_noeud%20is%20the%20unique%20identifier%20of%20each%20node%20(that%20is%2C%20if%20an%20identifier%20exists%20multiple%20times%20in%20ID_EX1%20and%20ID_EX2%20I%20note%20it%20only%20once%20in%20Id_noeud).%20The%20purpose%20of%20my%20work%20is%20to%20calculate%20the%20flow%20rate%20Q%20(which%20is%20sum%20of%20the%20Q_EX1et%20Q_EX2)%20for%20each%20node%20as%20follows%3A%20each%20Id_noeud%20should%20not%20appear%20only%203%20times%20between%20ID_EX1%20and%20ID_EX2%2C%20if%20it%20is%20not%20the%20case%20so%20there%20are%20values%20of%20Q_EX1%20and%20Q_EX2%20that%20are%20equal%20%2C%20I%20count%20for%20Q%20either%20Q_EX1%20or%20Q_EX2.%20For%20this%2C%20I%20use%20the%20function%20somme.si%20but%20I%20have%20to%20introduce%20the%20criterion%20(%22%3D%20Id_noeud%22)%20each%20time%20as%20well%20as%20work%20with%20the%20columns%20ID_EX1%20and%20ID_EX2%20each%20separately.%20is%20there%20a%20formula%20to%20calculate%20the%20Q%20bitrate%20automatically%20because%20the%20Excel%20files%20I%20worked%20with%20are%20very%20large.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20helping%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2559010%22%20slang%3D%22fr-FR%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2559097%22%20slang%3D%22en-US%22%3ERe%3A%20Automatiser%20une%20tache%20en%20utilisant%20somme.si%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559097%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1106059%22%20target%3D%22_blank%22%3E%40Belsam_mzh%3C%2FA%3E%26nbsp%3BPerhaps%20like%20in%20the%20attached%20file%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-07-17%20at%2020.51.44.png%22%20style%3D%22width%3A%20528px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296585i4A960E5E2398F321%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-07-17%20at%2020.51.44.png%22%20alt%3D%22Screenshot%202021-07-17%20at%2020.51.44.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2559113%22%20slang%3D%22fr-FR%22%3ERe%3A%20Automate%20a%20task%20using%20somme.si%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559113%22%20slang%3D%22fr-FR%22%3EThank%20you%20very%20much%20for%20your%20answer.%20you%20can%20make%20the%20sum%20criterion%20automatic%20but%20could%20you%20help%20me%20do%20this%20work%20on%20the%20whole%20matrix%20consisting%20of%204%20columns%20ID_EX1%2C%20Q_EX1%2C%20ID_EX2%20and%20Q_EX2.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2559372%22%20slang%3D%22en-US%22%3ERe%3A%20Automatiser%20une%20tache%20en%20utilisant%20somme.si%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559372%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1106059%22%20target%3D%22_blank%22%3E%40Belsam_mzh%3C%2FA%3E%26nbsp%3BSorry%2C%20don't%20understand%20the%20question.%20What%20would%20you%20like%20see%20in%20column%20I%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2559674%22%20slang%3D%22fr-FR%22%3ERe%3A%20Automate%20a%20task%20using%20somme.si%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559674%22%20slang%3D%22fr-FR%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%26nbsp%3BFor%20column%20I%20I%20want%20to%20calculate%20the%20sum%20of%20the%20Q_EX1%20and%20Q_EX2%20rates%20if%20the%20ID_EX1%20and%20ID_EX2%20identifiers%20equal%20ID_noeud.%20I%20worked%20with%20the%20formula%20%22%3DSOMME.SI(D%3AD%3B%20H3%3B%20E%3AE)%2BSUMIF(F%3AF%3B%20H%3AH%3B%20G%3AG)%22%2C%20the%20problem%20is%20Id_noeud%20can%20appear%20more%20than%203%20times%20between%20ID_EX1%20and%20ID_EX2%20if%20it%20is%20the%20case%20so%20there%20are%20Q_EX1%20and%20Q_EX2%20that%20are%20equal%20and%20I%20have%20to%20count%20for%20the%20sum%20either%20Q_EX1%20or%20Q_EX2.%20You%20can%20find%20two%20examples%20in%20this%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2559690%22%20slang%3D%22en-US%22%3ERe%3A%20Automatiser%20une%20tache%20en%20utilisant%20somme.si%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559690%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1106059%22%20target%3D%22_blank%22%3E%40Belsam_mzh%3C%2FA%3E%26nbsp%3BStill%20don't%20understand%20what%20you%20are%20talking%20about.%20By%20the%20way%20the%20formula%20in%20K7%20seems%20to%20be%20wrong%20it%20sums%20two%20different%20ID's.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20formula%20like%3A%3C%2FP%3E%3CP%3E%3DSOMME.SI(D%3AD%3BH3%3BE%3AE)%2BSUMIF(F%3AF%3BH3%3BG%3AG)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ein%20J3%20will%20SUM%20values%20from%20columns%20E%20and%20G%20where%20the%20IDs%20in%20columns%20D%20and%20F%20match%20the%20for%20ID%20in%20column%20H.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2559700%22%20slang%3D%22fr-FR%22%3ERe%3A%20Automate%20a%20task%20using%20somme.si%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2559700%22%20slang%3D%22fr-FR%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%3C%2FP%3E%3CP%3EYou%20are%20right%20for%20k7%20I%20corrected%20it.%3C%2FP%3E%3CP%3EFor%20the%20identifier%201229144%20the%20values%20of%20Q_EX1%20and%20Q_EX2%20are%20the%20same%20E13%20%3D%20G4%20%2C%20E14%20%3D%20G5%20and%20E15%20%3D%20G6%20so%20I%20will%20sum%20for%20I%20just%203%20values%20and%20not%20the%206.%3C%2FP%3E%3CP%3EIn%20the%20formula%20each%20ID%20must%20be%20repeated%20a%20maximum%20of%20three%20times%20and%20if%20the%20same%20identifier%20exists%20more%20than%203%20times%20in%20between%20ID_EX1%20and%20ID_EX2%20I%20move%20on%20to%20compare%20the%20Q_EX1%20and%20Q_EX2%2C%3C%2FP%3E%3CP%3Eif%20ID_EX1%20%3D%20ID_EX2%20and%20Q_EX1%3DQ_EX2%20for%20Q%20I%20count%20either%20Q_EX1%20or%20Q_EX2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Bonjour la communauté, 

 

Je suis novice avec Excel et je tente de créer une formule pour chercher une valeur dans un tableau, puis, si elle s'y trouve, de donner un résultat. 

Dans le fichier, ID_EX1 et ID_EX2 sont les identifiants des nœuds et ils représentent les extrémités des conduites. Q_EX1 et Q_EX2 sont les valeurs de débits correspondants respectivement à ID_EX1 et ID_Ex2. Id_noeud est l'identifiant unique de chaque nœud (c'est-à-dire si un identifiant existe plusieurs fois dans ID_EX1 et ID_EX2 je le note une seule fois dans Id_noeud). Le but de mon travail est de calculer le débit Q (qui est somme des Q_EX1et Q_EX2) pour chaque nœud comme suit: chaque Id_noeud ne doit pas apparaitre que 3 fois entre ID_EX1 et ID_EX2, s'il n'est pas le cas donc il existe des valeurs de Q_EX1 et Q_EX2 qui sont égaux, je compte pour Q soit Q_EX1 soit Q_EX2. Pour cela, j'ai utiliser la fonction somme.si mais je dois introduire le critère ("= Id_noeud") chaque fois ainsi que travailler avec les colonnes ID_EX1 et ID_EX2 chacune à part. y a-t-il une formule pour calculer le débit Q automatiquement car les fichiers Excel avec lesquels j'ai travaillé sont très volumineux.

 

Merci de m'aider.

 

Cordialement.

 

8 Replies

@Belsam_mzh Perhaps like in the attached file?

Screenshot 2021-07-17 at 20.51.44.png

Merci infiniment pour votre réponse. vous pouvez rendre le critère de somme automatique mais pourriez vous m'aider à faire ce travail sur toute la matrice composée de 4 colonnes ID_EX1, Q_EX1, ID_EX2 et Q_EX2.

@Belsam_mzh Sorry, don't understand the question. What would you like see in column I?

@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.

@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.

@Riny_van_Eekelen@Riny_van_Eekelen

Vous avez raison pour k7 j'ai le corrigé.

Pour l'identifiant 1229144 les valeurs de Q_EX1 et Q_EX2 sont les mêmes E13=G4 , E14=G5 et E15=G6 donc je vais sommer pour I juste 3 valeurs et non pas les 6.

Dans la formule chaque ID dois être répéter au maximum trois fois et si un même identifiant existe plus que 3 fois dans entre ID_EX1 et ID_EX2 je passe à comparer les Q_EX1 et Q_EX2,

si ID_EX1 = ID_EX2 et Q_EX1=Q_EX2 pour Q je compte soit Q_EX1 soit Q_EX2

 

@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.

Merci beaucoup pour votre réponse et votre temps .