solver how to get the average of 9 with 5 number

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
378
Office Version
  1. 2016
  2. 2010
  3. 2007
Platform
  1. Windows
  2. Web
Hi friends i have this numbers:

5,6,7,8,9,10

wich is the combinations of these numbers that give me an average of 9, (the numbers can repeated)

sample:

9+9+9+9+9= 45 / 5 = 9
10+10+10+7+8 = 45 / 5 = 9
10+10+9+8+8= 45 / 5 = 9

and with 5 numbers wich combination of numbers that give eman average of 8
and with 5 numbers wich combination of numbers that give eman average of 7
and with 5 numbers wich combination of numbers that give eman average of 6
and with 5 numbers wich combination of numbers that give eman average of 5

thanks
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
thanks for answer:


how can I make a combination of these numbers to achieve an average of 9, note the numbers can repeat, sample:


9+9+9+9+9= 45 / 5 = 9
10+10+10+7+8 = 45 / 5 = 9
10+10+9+8+8= 45 / 5 = 9

thanks
 
Upvote 0
you mean something like this?

Column1Column1.1Column1.2Column1.3Column1.4Addition
5​
10​
10​
10​
10​
45​
6​
9​
10​
10​
10​
45​
6​
10​
9​
10​
10​
45​
6​
10​
10​
9​
10​
45​
6​
10​
10​
10​
9​
45​
7​
8​
10​
10​
10​
45​
7​
9​
9​
10​
10​
45​
7​
9​
10​
9​
10​
45​
7​
9​
10​
10​
9​
45​
7​
10​
8​
10​
10​
45​
7​
10​
9​
9​
10​
45​
7​
10​
9​
10​
9​
45​
7​
10​
10​
8​
10​
45​
7​
10​
10​
9​
9​
45​
7​
10​
10​
10​
8​
45​
8​
7​
10​
10​
10​
45​
8​
8​
9​
10​
10​
45​
8​
8​
10​
9​
10​
45​
8​
8​
10​
10​
9​
45​
8​
9​
8​
10​
10​
45​
8​
9​
9​
9​
10​
45​
8​
9​
9​
10​
9​
45​
8​
9​
10​
8​
10​
45​
8​
9​
10​
9​
9​
45​
8​
9​
10​
10​
8​
45​
8​
10​
7​
10​
10​
45​
8​
10​
8​
9​
10​
45​
8​
10​
8​
10​
9​
45​
8​
10​
9​
8​
10​
45​
8​
10​
9​
9​
9​
45​
8​
10​
9​
10​
8​
45​
8​
10​
10​
7​
10​
45​
8​
10​
10​
8​
9​
45​
8​
10​
10​
9​
8​
45​
8​
10​
10​
10​
7​
45​
9​
6​
10​
10​
10​
45​
9​
7​
9​
10​
10​
45​
9​
7​
10​
9​
10​
45​
9​
7​
10​
10​
9​
45​
9​
8​
8​
10​
10​
45​
9​
8​
9​
9​
10​
45​
9​
8​
9​
10​
9​
45​
9​
8​
10​
8​
10​
45​
9​
8​
10​
9​
9​
45​
9​
8​
10​
10​
8​
45​
9​
9​
7​
10​
10​
45​
9​
9​
8​
9​
10​
45​
9​
9​
8​
10​
9​
45​
9​
9​
9​
8​
10​
45​
9​
9​
9​
9​
9​
45​
9​
9​
9​
10​
8​
45​
9​
9​
10​
7​
10​
45​
9​
9​
10​
8​
9​
45​
9​
9​
10​
9​
8​
45​
9​
9​
10​
10​
7​
45​
9​
10​
6​
10​
10​
45​
9​
10​
7​
9​
10​
45​
9​
10​
7​
10​
9​
45​
9​
10​
8​
8​
10​
45​
9​
10​
8​
9​
9​
45​
9​
10​
8​
10​
8​
45​
9​
10​
9​
7​
10​
45​
9​
10​
9​
8​
9​
45​
9​
10​
9​
9​
8​
45​
9​
10​
9​
10​
7​
45​
9​
10​
10​
6​
10​
45​
9​
10​
10​
7​
9​
45​
9​
10​
10​
8​
8​
45​
9​
10​
10​
9​
7​
45​
9​
10​
10​
10​
6​
45​
10​
5​
10​
10​
10​
45​
10​
6​
9​
10​
10​
45​
10​
6​
10​
9​
10​
45​
10​
6​
10​
10​
9​
45​
10​
7​
8​
10​
10​
45​
10​
7​
9​
9​
10​
45​
10​
7​
9​
10​
9​
45​
10​
7​
10​
8​
10​
45​
10​
7​
10​
9​
9​
45​
10​
7​
10​
10​
8​
45​
10​
8​
7​
10​
10​
45​
10​
8​
8​
9​
10​
45​
10​
8​
8​
10​
9​
45​
10​
8​
9​
8​
10​
45​
10​
8​
9​
9​
9​
45​
10​
8​
9​
10​
8​
45​
10​
8​
10​
7​
10​
45​
10​
8​
10​
8​
9​
45​
10​
8​
10​
9​
8​
45​
10​
8​
10​
10​
7​
45​
10​
9​
6​
10​
10​
45​
10​
9​
7​
9​
10​
45​
10​
9​
7​
10​
9​
45​
10​
9​
8​
8​
10​
45​
10​
9​
8​
9​
9​
45​
10​
9​
8​
10​
8​
45​
10​
9​
9​
7​
10​
45​
10​
9​
9​
8​
9​
45​
10​
9​
9​
9​
8​
45​
10​
9​
9​
10​
7​
45​
10​
9​
10​
6​
10​
45​
10​
9​
10​
7​
9​
45​
10​
9​
10​
8​
8​
45​
10​
9​
10​
9​
7​
45​
10​
9​
10​
10​
6​
45​
10​
10​
5​
10​
10​
45​
10​
10​
6​
9​
10​
45​
10​
10​
6​
10​
9​
45​
10​
10​
7​
8​
10​
45​
10​
10​
7​
9​
9​
45​
10​
10​
7​
10​
8​
45​
10​
10​
8​
7​
10​
45​
10​
10​
8​
8​
9​
45​
10​
10​
8​
9​
8​
45​
10​
10​
8​
10​
7​
45​
10​
10​
9​
6​
10​
45​
10​
10​
9​
7​
9​
45​
10​
10​
9​
8​
8​
45​
10​
10​
9​
9​
7​
45​
10​
10​
9​
10​
6​
45​
10​
10​
10​
5​
10​
45​
10​
10​
10​
6​
9​
45​
10​
10​
10​
7​
8​
45​
10​
10​
10​
8​
7​
45​
10​
10​
10​
9​
6​
45​
10​
10​
10​
10​
5​
45​
 
Upvote 0
or like this

5+ 10+ 10+ 10+ 10
45​
6+ 9+ 10+ 10+ 10
45​
7+ 8+ 10+ 10+ 10
45​
7+ 9+ 9+ 10+ 10
45​
8+ 8+ 9+ 10+ 10
45​
8+ 9+ 9+ 9+ 10
45​
9+ 9+ 9+ 9+ 9
45​
 
Upvote 0
@sandy666 yes... but wich is the forumla?



i want generate too:

and with 5 numbers wich combination of numbers that give me an average of 8
and with 5 numbers wich combination of numbers that give me an average of 7
and with 5 numbers wich combination of numbers that give me an average of 6
and with 5 numbers wich combination of numbers that give me an average of 5

Thanks
 
Upvote 0
I understand "yes" but I don't know which one

and this is PowerQuery not a formula or vba or even not a solver
 
Upvote 0
like me more the first answer, large table.

Thanks
 
Upvote 0
here is a M-code for table from post #4

Code:
[SIZE=1]let

    Source = {5,6,7,8,9,10},
    ToTable = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    Add1 = Table.AddColumn(ToTable, "Custom", each Query2),
    Expand1 = Table.ExpandTableColumn(Add1, "Custom", {"Column1"}, {"Column1.1"}),
    Add2 = Table.AddColumn(Expand1, "Custom", each Query2),
    Expand2 = Table.ExpandTableColumn(Add2, "Custom", {"Column1"}, {"Column1.2"}),
    Add3 = Table.AddColumn(Expand2, "Custom", each Query2),
    Expand3 = Table.ExpandTableColumn(Add3, "Custom", {"Column1"}, {"Column1.3"}),
    Add4 = Table.AddColumn(Expand3, "Custom", each Query2),
    Expand4 = Table.ExpandTableColumn(Add4, "Custom", {"Column1"}, {"Column1.4"}),
    Sum = Table.AddColumn(Expand4, "Addition", each List.Sum({[Column1], [Column1.1], [Column1.2], [Column1.3], [Column1.4]}), type number),
    Filter45 = Table.SelectRows(Sum, each [Addition] = 45)
in
    Filter45[/SIZE]
 
Last edited:
Upvote 0
this code where i put?

in VBA?

and if possible second solution post#5 how to?

thanks
 
Upvote 0

Forum statistics

Threads
1,215,674
Messages
6,126,144
Members
449,294
Latest member
Jitesh_Sharma

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top