information on combin please

T

tommy joe

Can anybody supply the following info
I know that they are 45 combinations in the following

=sum(combin(10,8)

But is there any way Excel can display the actual 45 columns of 8



Thanks for any help.

tommeyjo
 
P

Peter atherton

-----Original Message-----
Can anybody supply the following info
I know that they are 45 combinations in the following

=sum(combin(10,8)

But is there any way Excel can display the actual 45 columns of 8



Thanks for any help.

tommeyjoe

Tommy

This almost does it. it gives a sum of 1022 instead of
1024. You can add 1 to the top and 1 to the bottom to
complete the figures.

You enter 10 in B1 and 8 in B2.

Sub test()
Dim r As Long
n = Range("B1")
c = Range("B2")

For r = 1 To c
i = Application.WorksheetFunction.Combin(n, r)
Cells(5 + r, 1) = i
Next r
End Sub

Regards
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top