#1   Report Post  
Posted to microsoft.public.excel.misc
damezumari
 
Posts: n/a
Default AND in array formula

{=SUM(E13:AE13*IF(TEXT(E$7:AE$7,"mmmm")=mes,1,0))} gives 15.05767168


{=SUM(E13:AE13*IF(AND(TEXT(E$7:AE$7,"mmmm")=mes,TR UE),1,0))} gives 0

mes is the range name for a cell that contains the name of a month.

The top array formula works as expected, but why does the bottom one
give 0. It should give the same result as the top one as I have only
added TRUE in an AND condition.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme
 
Posts: n/a
Default AND in array formula

You cannot use Boolean ops in array formulas; you must use operators (*)
and (+) for AND and OR respectively.

Have you thought of using SUMPRODUCT?
=SUMPRODUCT(--(TEXT(E$7:AE$7,"mmmm")=mes),E13:AE13)
See
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

and

http://mcgimpsey.com/excel/formulae/doubleneg.html


best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"damezumari" wrote in message
ups.com...
{=SUM(E13:AE13*IF(TEXT(E$7:AE$7,"mmmm")=mes,1,0))} gives 15.05767168


{=SUM(E13:AE13*IF(AND(TEXT(E$7:AE$7,"mmmm")=mes,TR UE),1,0))} gives 0

mes is the range name for a cell that contains the name of a month.

The top array formula works as expected, but why does the bottom one
give 0. It should give the same result as the top one as I have only
added TRUE in an AND condition.



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
Array Formula Not Working with Range with Formulas [email protected] Excel Discussion (Misc queries) 4 February 1st 06 02:01 PM
Array formula returning wrong results TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 November 19th 05 10:29 AM
Suppress array formula #NA [email protected] Excel Worksheet Functions 4 November 15th 05 05:17 PM
problem with Array Formula OrdOff Excel Worksheet Functions 2 June 30th 05 04:57 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 06:39 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"