+ Reply to Thread
Results 1 to 14 of 14

Using the Binomial Distribution function in excel

Hybrid View

  1. #1
    Registered User
    Join Date
    09-10-2008
    Location
    UK
    Posts
    7
    WOW!!!!

    Thank you so much for your help SHG, this looks awesome!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Thought you'd died ...

    To be clear, the posted code computes the probability of flipping (for the example) 7 more heads than tails.

    The probability of flipping 7 heads before 9 tails would require changing the code -- you only need to simulate 16 flips total.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-10-2008
    Location
    UK
    Posts
    7
    err....

    I've just realised that I don't really know what to do with this bit of code. Could someone enlighten me on how to apply it to a spreadsheet?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    1. Copy the code from the post
    2. Press Alt+F11 to open the Visual Basic Editor (VBE)
    3. From the menu bar in the VBE window, do Insert > Module
    4. Paste the code in the window that opens
    5. Close the VBE to return to Excel

  5. #5
    Registered User
    Join Date
    09-10-2008
    Location
    UK
    Posts
    7
    Thanks a lot SHG. Without wanting to test your patience - how do I get it to perform the calculations for me now? I've followed the steps that you listed but now I'm back on a blank worksheet.

    I've never used the VBA side of things before you see.

    Once again - really appreciate your help mate. I can't thank you enough

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    See the example usage in post #3.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. NORMDIST function in excel giving values greater than 1
    By excelwho in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2013, 11:43 PM
  2. Excel 2007 error when adding custom help file to user defined function
    By sabotuer99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-04-2009, 01:10 AM
  3. Excel Sum Function Question
    By cmarty5445 in forum Excel General
    Replies: 1
    Last Post: 08-30-2008, 08:27 AM
  4. Writing VBA Macro or Excel Function
    By venkat_kodi in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-06-2007, 03:21 PM
  5. How to use Standard Excel function in VBA
    By akabraha in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2007, 03:50 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1