Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default SUMIF "value if false" not working

Hi Experts,

I just offered this as a solution to a post in public.excel.
Now I notice that while the "value if true" part works the "value if false" does not, per below, using Enter and/or Array-Enter.

In a Help search it said the "value if false" was optional, but if you include it should it not work?

Where A1=X and B1= 1 and C1= 2.
If A1=Z then I get #VALUE instead of xx.


Enter
=SUM(IF(A1="X",B1+C1,"xx")) A1=X Correct

C+S+E
=SUM(IF(A1="X",B1+C1,"xx")) A1=X Correct
=SUM(IF(A1="X",B1+C1,"xx")) A1=Z #VALUE

Enter
=SUM(IF(A1="X",B1+C1,"xx")) A1=Z #VALUE

Thanks.

Regards,
Howard
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default SUMIF "value if false" not working

wrote:
Now I notice that while the "value if true" part works
the "value if false" does not, per below, using Enter
and/or Array-Enter.


Why would you array-enter the formula below? It does not have any array or
range parameters.

(But the formula that you did offer does need to be array-entered --
although it is nonsensical exactly you wrote it.)


wrote:
Enter

[....]
=SUM(IF(A1="X",B1+C1,"xx")) A1=Z #VALUE


Read the SUM help page carefully.

SUM ignores text in a parameter only if "an argument is an array or
reference".

In contrast, "if any arguments are text that cannot be translated into
numbers, Excel displays an error".

For example, SUM("xx") return an Excel error.

The SUM expression could be written as follows (and normally-entered):

=SUM(IF(A1="X",B1+C1,0))

Arguably, SUM is not needed at all in this context. It is sufficient to
write:

=IF(A1="X",B1+C1,0)

However, I believe your example is intended to be a distillation of an
array-entered formula of the form:

=SUM(IF(A1:A100="X",B1:B100+C1:C100,0))

In that context, we do not need the value-if-false part; it returns FALSE by
default.

Moreover, in that context, we could replace 0 with "xx" since
IF(A1:A100="X",...) returns an array. But really, there is no reason to do
that.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default SUMIF "value if false" not working

On Sunday, February 3, 2013 11:41:15 PM UTC-8, joeu2004 wrote:
wrote:

Now I notice that while the "value if true" part works


the "value if false" does not, per below, using Enter


and/or Array-Enter.




Why would you array-enter the formula below? It does not have any array or

range parameters.



(But the formula that you did offer does need to be array-entered --

although it is nonsensical exactly you wrote it.)





wrote:

Enter


[....]

=SUM(IF(A1="X",B1+C1,"xx")) A1=Z #VALUE




Read the SUM help page carefully.



SUM ignores text in a parameter only if "an argument is an array or

reference".



In contrast, "if any arguments are text that cannot be translated into

numbers, Excel displays an error".



For example, SUM("xx") return an Excel error.



The SUM expression could be written as follows (and normally-entered):



=SUM(IF(A1="X",B1+C1,0))



Arguably, SUM is not needed at all in this context. It is sufficient to

write:



=IF(A1="X",B1+C1,0)



However, I believe your example is intended to be a distillation of an

array-entered formula of the form:



=SUM(IF(A1:A100="X",B1:B100+C1:C100,0))



In that context, we do not need the value-if-false part; it returns FALSE by

default.



Moreover, in that context, we could replace 0 with "xx" since

IF(A1:A100="X",...) returns an array. But really, there is no reason to do

that.


Thanks, joeu.
If I can re-find that page I'll read it closer.
This little formula purely slipped between my mental cracks.

=IF(A1="X",B1+C1,0)

Regards,
Howard
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
=IF(VLOOKUP(C11,Group,2,FALSE)=D11,"True","Not Valid") and =IF(D1 Milky Excel Worksheet Functions 1 August 20th 08 08:38 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Setting values for "TRUE","FALSE" and "#REF!" Hurtige[_2_] Excel Programming 1 August 11th 06 12:31 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
IF(VLOOKUP("MYDATA", MYNAME, 4) = 0, "TRUE", "FALSE") Souris Excel Programming 2 August 17th 05 05:33 AM


All times are GMT +1. The time now is 08:46 AM.

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

About Us

"It's about Microsoft Excel"