+ Reply to Thread
Results 1 to 10 of 10

Tricky formula: is this even possible?

  1. #1
    Registered User
    Join Date
    03-06-2018
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    10

    Tricky formula: is this even possible?

    Hello,

    I have a spreadsheet where I need to calculate the following expression:

    trickyformula.png

    Currently I do it with a VBA macro or I can calculate it using a few cells that I hid afterwards, but is it even possible to calculate this with a single formula?

    m and n are integers with m>=n and P is a real with 0 < P < 1.

    Any help is appreciated!

    Regards.
    Last edited by SomeRoark; 02-15-2019 at 05:09 AM.

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Tricky formula: is this even possible?

    Post your excel file containing the formulas or VBA macro, not the mathematics formula, as it can be easier to provide a solution.
    Click the * to say thanks.

  3. #3
    Registered User
    Join Date
    03-06-2018
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    10

    Re: Tricky formula: is this even possible?

    Sure!

    Here it is.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-06-2018
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    10

    Re: Tricky formula: is this even possible?

    Of course, the first term of the sum (the one with the factorials) is the number of n-combinations of a set of k elements. In Excel this is calculated by function COMBIN(m;n).

    Regards.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Tricky formula: is this even possible?

    Please try

    =SUMPRODUCT(COMBIN(B2,ROW(INDIRECT(B3&":"&B2))),B4^ROW(INDIRECT(B3&":"&B2)),(1-B4)^(B2-ROW(INDIRECT(B3&":"&B2))))

  6. #6
    Registered User
    Join Date
    03-06-2018
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    10

    Re: Tricky formula: is this even possible?

    Bloody hell, seems to work like a charm Let me spend the next few hours of my life trying to figure out how that works... I had to change the "," by ";" but other than that seems to be spot on.

    Many, MANY thanks Bo_Ry
    Last edited by SomeRoark; 02-15-2019 at 07:24 AM.

  7. #7
    Registered User
    Join Date
    03-06-2018
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    10

    Re: Tricky formula: is this even possible?

    Is it too much to ask for a brief summary of how you tackled the issue? After a quick inspection I am still a bit confused...
    Last edited by SomeRoark; 02-15-2019 at 07:39 AM.

  8. #8
    Registered User
    Join Date
    03-06-2018
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    10

    Re: Tricky formula: is this even possible?

    This is the part I am having a hard time trying to figure out...

    =ROW(INDIRECT(B3&":"&B2))

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Tricky formula: is this even possible?

    The goal is to create a set of number from n to m, eg; 2,3,4

    =ROW(INDIRECT(B3&":"&B2))
    =ROW(INDIRECT("2:4")) indirect change text to cell reference
    =ROW(2:4) ROW gives row# of referecne cell
    ={2;3;4}

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Tricky formula: is this even possible?

    I read that as the probability of having n to m successes in m trials, which is ...

    A
    B
    C
    1
    Name
    P-301 A/B
    2
    m
    4
    3
    n
    2
    4
    P
    0.90
    5
    Block P
    0.9963
    B5: =1 - BINOM.DIST(n - 1, m, p, TRUE)
    Last edited by shg; 02-16-2019 at 02:29 PM.
    Entia non sunt multiplicanda sine necessitate

+ 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. Replies: 2
    Last Post: 11-15-2018, 12:50 AM
  2. Tricky If Formula
    By DavidMcArthur in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-15-2015, 01:06 PM
  3. Need help with tricky formula
    By garygnobriga in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-20-2014, 12:46 AM
  4. Tricky formula
    By martins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2007, 07:18 PM
  5. Tricky Formula
    By andrewc in forum Excel General
    Replies: 22
    Last Post: 07-20-2006, 06:45 AM
  6. [SOLVED] tricky formula.. please help
    By Aaron H in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-14-2006, 08:36 PM
  7. [SOLVED] Tricky Formula.. Please Help
    By Aaron H in forum Excel General
    Replies: 1
    Last Post: 01-17-2005, 08:06 AM

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