THANK YOU BILL W.! statistical func.

# Thread: THANK YOU BILL W.! statistical func.

1. Senior Member
Join Date
Dec 1969
Posts
161

## THANK YOU BILL W.! statistical func.

Thank you Bill W. for your help. I would respond to yesterday&#039;s post, but I am afraid you would not see it. <BR><BR>Edward Stoever

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## You can stick with thread...

...because if you respond to an old post...even one from last year...it is automatically moved into today&#039;s postings!<BR><BR>Look at the dates on the first msg in various threads sometimes. Often, they are not from today.<BR><BR>And most of us who regularly post here use the "ctrl-F" trick to find messages. I do "ctrl-F" to "Find what" on the current page and then type in "wilk". That way I can easily find all the messages I have posted...and, consequently, all the replies to them.<BR><BR>Including replies to messages I posted yesterday or last week or (yes, it has happened!) last year.<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
96,118

## Is this what you came up with?

Or something pretty similar?<BR><BR>&#060;%<BR>Function Combin( f, n ) <BR>&nbsp; &nbsp; dim i, p, m1, m2<BR>&nbsp; &nbsp; p = 1<BR>&nbsp; &nbsp; If (f - n) &#062; n Then<BR>&nbsp; &nbsp; &nbsp; &nbsp; m1 = f-n<BR>&nbsp; &nbsp; &nbsp; &nbsp; m2 = n<BR>&nbsp; &nbsp; Else<BR>&nbsp; &nbsp; &nbsp; &nbsp; m1 = n<BR>&nbsp; &nbsp; &nbsp; &nbsp; m2 = f-n<BR>&nbsp; &nbsp; End If<BR>&nbsp; &nbsp; For i = m1+1 To f<BR>&nbsp; &nbsp; &nbsp; &nbsp; p = p * i<BR>&nbsp; &nbsp; Next<BR>&nbsp; &nbsp; For i = 2 To m2<BR>&nbsp; &nbsp; &nbsp; &nbsp; p = p / i<BR>&nbsp; &nbsp; Next<BR>&nbsp; &nbsp; Combin = p<BR>End Function<BR>%&#062;<BR><BR>By checking which is larger (n or f-n), you do the minimum multiplies in calculating the dividend and minimum divides in producing the divisor of the final result.<BR><BR><BR><BR>

4. Senior Member
Join Date
Dec 1969
Posts
96,118

...in that. The code&#039;s right, even if it did suffer indenting problems in the transition from Notepad to here.<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•