Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello Phil2006, Here is macro that should do what you need. Code: -------------------- 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 -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=563982 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=SUMPRODUCT(A1*B1:B10)
-- Regards, Tom Ogilvy "phil2006" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating probabilities | Excel Worksheet Functions | |||
Calculating Probabilities | Excel Worksheet Functions | |||
Question about use of Poisson probabilities | Excel Worksheet Functions | |||
Question about use of Poisson probabilities | Excel Discussion (Misc queries) | |||
Macro and probabilities | Excel Programming |