#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Counting Blanks

Has Excel always counted blanks under the following condition?:

{=sum((range1=condition1)*(cond2result2))}

where result2 could contain blanks to allow for errors in a calculated result?

I know that I can amend the formula so that blanks are excluded but I never
expected blanks to be counted.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Counting Blanks

Not sure I have understood your query..

What about using MIN() for the array
{=SUM((range1=condition1)*(range2MIN(result2)))}

OR non-array formula
=SUMPRODUCT((range1=condition1)*(range2MIN(result 2)))


--
Jacob


"JPDS" wrote:

Has Excel always counted blanks under the following condition?:

{=sum((range1=condition1)*(cond2result2))}

where result2 could contain blanks to allow for errors in a calculated result?

I know that I can amend the formula so that blanks are excluded but I never
expected blanks to be counted.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Counting Blanks

Seeing your response; I think I have totally misunderstood your
question...While using array formulas the blanks are treated as 0..

=SUM((A1:A6=0)*(B1:B6="A")) will return 1

--
Jacob


"Jacob Skaria" wrote:

Not sure I have understood your query..

What about using MIN() for the array
{=SUM((range1=condition1)*(range2MIN(result2)))}

OR non-array formula
=SUMPRODUCT((range1=condition1)*(range2MIN(result 2)))


--
Jacob


"JPDS" wrote:

Has Excel always counted blanks under the following condition?:

{=sum((range1=condition1)*(cond2result2))}

where result2 could contain blanks to allow for errors in a calculated result?

I know that I can amend the formula so that blanks are excluded but I never
expected blanks to be counted.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Counting Blanks

Is there a rationale for this? Why does this not occur in non-array formula?

Thanks Jacob

"Jacob Skaria" wrote:

Seeing your response; I think I have totally misunderstood your
question...While using array formulas the blanks are treated as 0..

=SUM((A1:A6=0)*(B1:B6="A")) will return 1

--
Jacob


"Jacob Skaria" wrote:

Not sure I have understood your query..

What about using MIN() for the array
{=SUM((range1=condition1)*(range2MIN(result2)))}

OR non-array formula
=SUMPRODUCT((range1=condition1)*(range2MIN(result 2)))


--
Jacob


"JPDS" wrote:

Has Excel always counted blanks under the following condition?:

{=sum((range1=condition1)*(cond2result2))}

where result2 could contain blanks to allow for errors in a calculated result?

I know that I can amend the formula so that blanks are excluded but I never
expected blanks to be counted.

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Counting Blanks

Hi,
try

=SUMPRODUCT((range1=condition1)+(resul2=con2))


"JPDS" wrote:

Has Excel always counted blanks under the following condition?:

{=sum((range1=condition1)*(cond2result2))}

where result2 could contain blanks to allow for errors in a calculated result?

I know that I can amend the formula so that blanks are excluded but I never
expected blanks to be counted.

Thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Counting Blanks

Gives a totally different answer.

Imagine a1:a6 = 10,20,30,40,blank,100
b1:b6 = a,a,a,a,a,a

=SUMPRODUCT((A1:A6<100)*(B1:B6="A")) Result=5 - WRONG
{=SUM((A1:A6<100)*(B1:B6="A")) Result=5 - WRONG
=COUNTIF(A1:A6,"<100") Result=4 - CORRECT

The sumproduct and SUM(Array) formula count the blank. Does that make sense?

"Eduardo" wrote:

Hi,
try

=SUMPRODUCT((range1=condition1)+(resul2=con2))


"JPDS" wrote:

Has Excel always counted blanks under the following condition?:

{=sum((range1=condition1)*(cond2result2))}

where result2 could contain blanks to allow for errors in a calculated result?

I know that I can amend the formula so that blanks are excluded but I never
expected blanks to be counted.

Thanks

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Counting Blanks

Hi,
the sumproduct formula is

=sumproduct(--(a1:a6<100),--(a1:a6<""),--(b1:b6="a"))

"JPDS" wrote:

Gives a totally different answer.

Imagine a1:a6 = 10,20,30,40,blank,100
b1:b6 = a,a,a,a,a,a

=SUMPRODUCT((A1:A6<100)*(B1:B6="A")) Result=5 - WRONG
{=SUM((A1:A6<100)*(B1:B6="A")) Result=5 - WRONG
=COUNTIF(A1:A6,"<100") Result=4 - CORRECT

The sumproduct and SUM(Array) formula count the blank. Does that make sense?

"Eduardo" wrote:

Hi,
try

=SUMPRODUCT((range1=condition1)+(resul2=con2))


"JPDS" wrote:

Has Excel always counted blanks under the following condition?:

{=sum((range1=condition1)*(cond2result2))}

where result2 could contain blanks to allow for errors in a calculated result?

I know that I can amend the formula so that blanks are excluded but I never
expected blanks to be counted.

Thanks

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
counting non-blanks DJK Moore New Users to Excel 2 January 8th 09 10:22 PM
counting blanks Paul Excel Worksheet Functions 1 December 10th 06 02:14 AM
Counting blanks, either 1, 2 or 3 Steve Excel Worksheet Functions 5 January 14th 06 02:18 AM
Counting Blanks T De Villiers Excel Worksheet Functions 2 August 23rd 05 02:34 PM
If Then, not using values, or not counting blanks Need Help 123 Excel Worksheet Functions 8 July 20th 05 06:23 PM


All times are GMT +1. The time now is 06:17 PM.

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"