Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Conditional Product

Hi
XL-XP. I'm trying to create a cell formula (not UDF) that gives me the
product of all lines that are true, e.g.

A, True, 2
B, True, 3
C, False,4
D, True, 5

Would give 30 (2*3*5)
I can get the sum of these without a problem with the array formula
{=SUMPRODUCT((B1:B4=TRUE)*C1:C4)}
but cannot find a corresponding PRODUCT-PRODUCT formula.

Any help gratefully appreciated.
John


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Conditional Product

=PRODUCT(IF(B1:B5=TRUE,C1:C5))
Entered with Ctrl+Shift+enter rather than just Enter since this is an array
formula.

--
Regards,
Tom Ogilvy

"John" wrote in message
.. .
Hi
XL-XP. I'm trying to create a cell formula (not UDF) that gives me the
product of all lines that are true, e.g.

A, True, 2
B, True, 3
C, False,4
D, True, 5

Would give 30 (2*3*5)
I can get the sum of these without a problem with the array formula
{=SUMPRODUCT((B1:B4=TRUE)*C1:C4)}
but cannot find a corresponding PRODUCT-PRODUCT formula.

Any help gratefully appreciated.
John




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Conditional Product

Hi
you don't have to array enter your formula. SUMPRODUCT would work
without it.

--
Regards
Frank Kabel
Frankfurt, Germany

"John" schrieb im Newsbeitrag
.. .
Hi
XL-XP. I'm trying to create a cell formula (not UDF) that gives me

the
product of all lines that are true, e.g.

A, True, 2
B, True, 3
C, False,4
D, True, 5

Would give 30 (2*3*5)
I can get the sum of these without a problem with the array formula
{=SUMPRODUCT((B1:B4=TRUE)*C1:C4)}
but cannot find a corresponding PRODUCT-PRODUCT formula.

Any help gratefully appreciated.
John



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Conditional Product

Tom ....Many thanks, you're a star - as always :-)

"Tom Ogilvy" wrote in message
...
=PRODUCT(IF(B1:B5=TRUE,C1:C5))
Entered with Ctrl+Shift+enter rather than just Enter since this is an
array
formula.

--
Regards,
Tom Ogilvy

"John" wrote in message
.. .
Hi
XL-XP. I'm trying to create a cell formula (not UDF) that gives me the
product of all lines that are true, e.g.

A, True, 2
B, True, 3
C, False,4
D, True, 5

Would give 30 (2*3*5)
I can get the sum of these without a problem with the array formula
{=SUMPRODUCT((B1:B4=TRUE)*C1:C4)}
but cannot find a corresponding PRODUCT-PRODUCT formula.

Any help gratefully appreciated.
John






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a product key for my Trail product, 2007 Microsoft Office s sltchsyi Setting up and Configuration of Excel 0 May 4th 09 01:32 AM
sum product sum if conditional HELP!!! laandmc Excel Discussion (Misc queries) 2 January 9th 09 02:26 PM
Conditional PRODUCT or SUM Kevin H. Excel Worksheet Functions 9 January 5th 09 09:40 AM
Custom function for Sum Product (Conditional Formula) FARAZ QURESHI Excel Discussion (Misc queries) 2 December 27th 07 10:21 AM
Conditional Sum Product Ben010 Excel Discussion (Misc queries) 12 June 15th 06 06:23 PM


All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"