Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Three same Formulas

Hi everyone

I've got these three sumproduct formulas that returns the right answer.
=SUMPRODUCT((YEAR(A5:A150)=2008)*(C5:C150="Dept021 ")*B5:B150)
=SUMPRODUCT(--(YEAR(A5:A150)=2008),--(C5:C150="Dept021"),B5:B150)
=SUMPRODUCT(N(YEAR(A5:A150)=2008),N(C5:C150="Dept0 21"),B5:B150)
I would like to know if they're all the same.
Can they be use for different situation.
Any preference over others and for what reason?

Thank you
Regards
John
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Three same Formulas

See http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
__________________________________
HTH

Bob

"John" wrote in message
...
Hi everyone

I've got these three sumproduct formulas that returns the right answer.
=SUMPRODUCT((YEAR(A5:A150)=2008)*(C5:C150="Dept021 ")*B5:B150)
=SUMPRODUCT(--(YEAR(A5:A150)=2008),--(C5:C150="Dept021"),B5:B150)
=SUMPRODUCT(N(YEAR(A5:A150)=2008),N(C5:C150="Dept0 21"),B5:B150)
I would like to know if they're all the same.
Can they be use for different situation.
Any preference over others and for what reason?

Thank you
Regards
John



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Three same Formulas

On Jan 9, 11:32*am, "John" wrote:
Hi everyone

I've got these three sumproduct formulas that returns the right answer.
=SUMPRODUCT((YEAR(A5:A150)=2008)*(C5:C150="Dept021 ")*B5:B150)
=SUMPRODUCT(--(YEAR(A5:A150)=2008),--(C5:C150="Dept021"),B5:B150)
=SUMPRODUCT(N(YEAR(A5:A150)=2008),N(C5:C150="Dept0 21"),B5:B150)
I would like to know if they're all the same.
Can they be use for different situation.
Any preference over others and for what reason?

Thank you
Regards
John


They are all the same. You need to use an operator to get SUMPRODUCT
to see your logical expressions with 1s and 0s instead of TRUEs and
FALSEs. Those formulas all do that in a different way. The most common
seems to be the "--", probably because it is distinctive and
versatile. Pick which you like and always use it so it will be
familiar.
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
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
lookup formulas dependent upon lookup formulas Skibee Excel Worksheet Functions 1 July 20th 07 01:06 PM
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM


All times are GMT +1. The time now is 03:51 PM.

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"