Passer au contenu principal

Trouvez facilement toutes les combinaisons qui égalent une somme donnée dans Excel

Supposons qu'il existe une liste de nombres (nombres entiers, nombres décimaux ou nombres négatifs), et maintenant, vous voulez trouver toutes les combinaisons possibles à partir de ces nombres qui correspondent à une somme donnée. Normalement, vous pouvez utiliser des formules, un complément Solveur ou une fonction définie par l'utilisateur pour y parvenir, mais cela prend du temps et n'est pas facile à gérer. Ici avec l'utile Créer un numéro utilité de Kutools for Excel, trouver toutes les combinaisons qui égalent une somme donnée n'a jamais été aussi facile dans Excel.

Trouver toutes les combinaisons qui égalent une somme donnée


Trouver toutes les combinaisons qui égalent une somme donnée

Comme le montre la capture d'écran ci-dessous, pour trouver toutes les combinaisons possibles de nombres dans la plage B3: B11 qui totalisent 520, vous pouvez essayer avec l'utilitaire Make Up a Number comme suit.

1. Cliquez Kutools > Contenu > Créer un numéro.

coup composent un numéro 03

2. dans le Composez un numéro boîte de dialogue, veuillez effectuer les paramètres ci-dessous.

  • Dans le La source de données , sélectionnez la liste de numéros pour trouver les nombres totalisant 520;
  • Dans le Options section, entrez 520 dans la Somme zone de texte;
  • Cliquez OK bouton. Voir la capture d'écran:

3. Dans le prochain Composez un numéro boîte de dialogue, sélectionnez une cellule pour afficher les combinaisons et cliquez sur le OK bouton. Puis un Kutools for Excel une boîte de dialogue apparaît pour vous dire combien de combinaisons seront créées, cliquez sur OK.

Vous pouvez voir toutes les combinaisons possibles de nombres sélectionnés qui totalisent 520 sont répertoriées comme suit.

Notes:

1. Il est facultatif de spécifier le nombre de combinaisons et le nombre d'éléments dans chaque combinaison au lieu de générer toutes les combinaisons. Comme le montre la capture d'écran ci-dessous, vous pouvez spécifier le nombre de combinaisons comme 4 et spécifier le nombre d'éléments dans chaque combinaison de 1 à 4, puis, vous obtiendrez le résultat suivant:

Résultat:

2. Cette fonctionnalité puissante peut également être appliquée aux nombres décimaux et négatifs, voir capture d'écran:

Et vous obtiendrez le résultat comme ci-dessous la capture d'écran montrée:

3. Vous pouvez vérifier le Enregistrer dans une nouvelle feuille pour sortir les combinaisons dans une nouvelle feuille.


Trouver toutes les combinaisons qui égalent une somme donnée

Kutools for Excel comprend plus de 300 outils Excel pratiques. Essai gratuit sans limitation de 30 jours. Téléchargez la version d'essai gratuite maintenant!


Outils de productivité recommandés
Les outils suivants peuvent considérablement économiser votre temps et votre argent, lequel est fait pour vous?
Office Tab: Utilisation des onglets pratiques dans votre bureau, comme la voie de Chrome, Firefox et Nouvel Internet Explorer.
Kutools for Excel: Plus de 300 fonctions avancées pour Excel 2021, 2019, 2016, 2013, 2010, 2007 et Office 365.

Kutools for Excel

La fonctionnalité décrite ci-dessus n'est que l'une des 300 fonctions puissantes de Kutools for Excel.

Conçu pour Excel (Office) 2021, 2019, 2016, 2013, 2010, 2007 et Office 365. Téléchargement gratuit et utilisation pendant 30 jours.

Capture d'écran de Kutools pour Excel

btn en savoir plus      télécharger btn     achat btn

Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Is it possible to consider repetition of the same number as well?
For example:
numbers: 10 - 20 - 40
Given number: 90

Combination: 40 - 40 - 10

Thank you!
This comment was minimized by the moderator on the site
Hi Giuseppe,

Sorry for the inconvenience. If your original data doesn't contain any duplicates, then duplicate values cannot be generated from it. Creating duplicate values for the same number would result in numerous combinations, which is generally not advisable due to complexity.
This comment was minimized by the moderator on the site
I do not know about others, but I still have it.
This comment was minimized by the moderator on the site
There is no "Make up a number" under Content in my Kutools, has this feature been removed?
This comment was minimized by the moderator on the site
Hi Alex Ramaker,
I am sorry for the inconvenience. Can you tell me which Kutools version are you using? If you can't find it under the Content group, please press the Alt + S keys to open the Kutools search box and type in "Make up a number", and then the feature name will be listed under the search box. Just click on it to activate the feature.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/make_up_a_number.png
This comment was minimized by the moderator on the site
I am also missing features in the Content section including Make Up a Number and Data Association and using Alt + S does not give me an option to search functions. Version is 19.0. Kutools was downloaded to my work machine through my organization's catalog, is it possible certain features are blocked?
This comment was minimized by the moderator on the site
Hi Sylvia,

The Make Up a Number feature was released in version 23.00 and the Data Association feature was released in version 25.00.
You are using an old version of Kutools and It’s the lifetime license with the 2-year free update support.
After the 2-year free update support, you cannot update to any new versions but you can still use the old versions of the software.
After the 2-year free update support, you will need to purchase a new version to use the features in the new version.
This comment was minimized by the moderator on the site
The bug has not been fixed yet. Even though I select one output, and wait forever for the answer, I still get an error message stating that the tool can't handle more than 1,600+ answers. I did not ask for that many, I asked for *one*.
This comment was minimized by the moderator on the site
Hi Cathy,
Sorry for the convenience and thanks for your support.
Our developers are working on upgrading this feature to have a better and fast way to deal with big data. And the new version will be released soon.
Please stay tuned for our updates!
This comment was minimized by the moderator on the site
Was the bug fixed? What was great? Thank you.
This comment was minimized by the moderator on the site
This is so great, Thanks
This comment was minimized by the moderator on the site
Same here. The function gets hung-up when searing more than 1000 numbers. I do see a progress bar, but it continues to get stuck at 6%. I have been using their products for close to a decade; it would be nice if they fixed/improved this. I was told to install latest version. I wouldn't know how to install anything other than the latest version.
This comment was minimized by the moderator on the site
Hi Tony,
Sorry for the convenience and thanks for your support for close to a decade.
Our developers are working on upgrading this feature to have a better and fast way to deal with big data, and it will be avaliable in the next release.
By the way, do the 1000+ numbers you used include positive numbers, negative numbers and decimal numbers? Do you mind send us the sample file for testing via ?
This comment was minimized by the moderator on the site
Anyone able to get this to work? The Processing please wait is taking forever.. Don't want to cancel

This comment was minimized by the moderator on the site
I'm having this problem! Did you get it to work?
This comment was minimized by the moderator on the site
instead of "processing, please wait" it needs to have a counter which displays either how much time is estimated to be remaining to calculate or an actual counter of the calculations done and remaining to be counted. ie i have waited over 4 hours for the program to work out my 44C8 query (177m combinations) but i don't know whether the program has crashed or is still calculating.
This comment was minimized by the moderator on the site
Still going after another 6 hours (10hrs all up). i assume it has crashed and will force close the program.
This comment was minimized by the moderator on the site
ok just tried a 35C8 and it took just over 90mins, so maybe 44C8 takes 11.5hrs.
This comment was minimized by the moderator on the site
È possibile escludere delle combinazioni da quelle trovate ?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations