+ Reply to Thread
Results 1 to 3 of 3

Probabilities

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-05-2006
    Posts
    166

    Probabilities

    I have a number of probabilities and need to multiply them by numerous other probabilities. Is there any way of multiplying cell A1 by cells B1:b20 and summing the totals?

    Thanks

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Phil2006,

    Here is macro that should do what you need.

    Public Function SumScalarProduct(Scalar As Double, ProductArray  As Range)
      Dim ProdCell As Range
      Dim Total
    
        For Each ProdCell In ProductArray
          Total = Total + (Scalar.Value * ProdCell.Value)
        Next ProdCell
      
        SumScalarProduct = Total
    End Function
    Example of using the Macro:
    Result = SumScalarProduct(Range("A1").Value, Range("B1:B20"))

    Sincerely,
    Leith Ross

  3. #3
    Tom Ogilvy
    Guest

    Re: Probabilities

    =SUMPRODUCT(A1*B1:B10)

    --
    Regards,
    Tom Ogilvy


    "phil2006" <phil2006.2bcrf4_1153581308.0755@excelforum-nospam.com> wrote in
    message news:phil2006.2bcrf4_1153581308.0755@excelforum-nospam.com...
    >
    > I have a number of probabilities and need to multiply them by numerous
    > other probabilities. Is there any way of multiplying cell A1 by cells
    > B1:b20 and summing the totals?
    >
    > Thanks
    >
    >
    > --
    > phil2006
    > ------------------------------------------------------------------------
    > phil2006's Profile:
    > http://www.excelforum.com/member.php...o&userid=35092
    > View this thread: http://www.excelforum.com/showthread...hreadid=563982
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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