solver how to get the average of 9 with 5 number

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
387
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
 
did you read post #7 ?!

here is for 5,6,7,8,9
with parts of the table because it has 1556 records

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5​
[/td][td]
8​
[/td][td]
5​
[/td][td]
7​
[/td][td]
5​
[/td][td]
6​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
7​
[/td][td]
5​
[/td][td]
5​
[/td][td]
8​
[/td][td]
5​
[/td][td]
6​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5​
[/td][td]
8​
[/td][td]
6​
[/td][td]
5​
[/td][td]
6​
[/td][td]
6​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
7​
[/td][td]
5​
[/td][td]
5​
[/td][td]
5​
[/td][td]
8​
[/td][td]
6​
[/td][/tr]
[/table]

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
7​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
6​
[/td][td]
6​
[/td][td]
8​
[/td][td]
10​
[/td][td]
5​
[/td][td]
7​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
7​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
7​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
6​
[/td][td]
5​
[/td][td]
9​
[/td][td]
6​
[/td][td]
9​
[/td][td]
7​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
7​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
9​
[/td][td]
6​
[/td][td]
10​
[/td][td]
5​
[/td][td]
10​
[/td][td]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
9​
[/td][td]
6​
[/td][td]
10​
[/td][td]
6​
[/td][td]
9​
[/td][td]
8​
[/td][/tr]
[/table]


[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td]
8​
[/td][td]
5​
[/td][td]
10​
[/td][td]
10​
[/td][td]
7​
[/td][td]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
5​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
8​
[/td][td]
6​
[/td][td]
7​
[/td][td]
9​
[/td][td]
10​
[/td][td]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
7​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
10​
[/td][td]
8​
[/td][td]
10​
[/td][td]
10​
[/td][td]
7​
[/td][td]
9​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
10​
[/td][td]
10​
[/td][td]
8​
[/td][td]
10​
[/td][td]
7​
[/td][td]
9​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
8​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
10​
[/td][td]
10​
[/td][td]
9​
[/td][td]
7​
[/td][td]
9​
[/td][td]
9​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][td=bgcolor:#E2EFDA]
6​
[/td][td=bgcolor:#E2EFDA]
10​
[/td][td=bgcolor:#E2EFDA]
9​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
10​
[/td][td]
10​
[/td][td]
8​
[/td][td]
8​
[/td][td]
9​
[/td][td]
9​
[/td][/tr]
[/table]


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"}),
    Average = Table.AddColumn(Expand4, "Average", each List.Average({[Column1], [Column1.1], [Column1.2], [Column1.3], [Column1.4]}), type number),
    ChTpText = Table.TransformColumnTypes(Average,{{"Average", type text}}),
    FilterDot = Table.SelectRows(ChTpText, each not Text.Contains([Average], ".")),
    CHTpNum = Table.TransformColumnTypes(FilterDot,{{"Average", Int64.Type}}),
    SortAsc = Table.Sort(CHTpNum,{{"Average", Order.Ascending}})
in
    SortAsc[/SIZE]

in PowerQuery Editor open Advanced Editor and paste code copied from here
 
Last edited:
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I forgot...
first you need do this, name it as Query2
Code:
[SIZE=1]
let
    Source = {5,6,7,8,9,10},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
    #"Converted to Table"[/SIZE]
then post above (#11)
 
Last edited:
Upvote 0
you need to decide which one is correct for you because they are completly different
 
Upvote 0
@sandy666 not luck, downloaded power query, installed, and tell me Excel 2016 have power query, i go to data tab, but not see..

how to activate it?

thanks
 
Upvote 0
gt.jpg


what real version of excel do you have?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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