Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default Ignor null in count

I need to count the number of values between -5.5% & +5.5%.
I use named ranges pcp & classification (classification is linked to a drop
down list)

={SUM(IF(pcp<5.5%,IF(classification=B38,1,0)))-SUM(IF(pcp<-5.5%,IF(classification=B38,1,0)))}

The formula works nearly OK except that it counts NULL values. I can have 0
values ocasionally which need to be included, but not empty cells
Can anyone help?

Saintsman
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Ignor null in count

One way (array-entered):

=SUM(IF(ISNUMBER(pcp),(ABS(pcp)<5.5)*(classificati on=$B$38)))


In article ,
Saintsman wrote:

I need to count the number of values between -5.5% & +5.5%.
I use named ranges pcp & classification (classification is linked to a drop
down list)

={SUM(IF(pcp<5.5%,IF(classification=B38,1,0)))-SUM(IF(pcp<-5.5%,IF(classificat
ion=B38,1,0)))}

The formula works nearly OK except that it counts NULL values. I can have 0
values ocasionally which need to be included, but not empty cells
Can anyone help?

Saintsman

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Ignor null in count

=SUMPRODUCT(--(classification=B38),--(pcp<""),--(pcp<5.5%),--(pcp-5.5%))

btw, the less than character should be greater than -5.5% in the second
part of your formula. The formula I gave you can be entered normally


--
Regards,

Peo Sjoblom



"Saintsman" wrote in message
...
I need to count the number of values between -5.5% & +5.5%.
I use named ranges pcp & classification (classification is linked to a
drop
down list)

={SUM(IF(pcp<5.5%,IF(classification=B38,1,0)))-SUM(IF(pcp<-5.5%,IF(classification=B38,1,0)))}

The formula works nearly OK except that it counts NULL values. I can have
0
values ocasionally which need to be included, but not empty cells
Can anyone help?

Saintsman



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Ignor null in count

Nevermind, your formula is of course correct except for the blanks, I didn't
even notice that you were subtracting the second string. Regardless even if
the formula is correct when it comes to finding values between 5.5% -5.5% it
doesn't really make any sense using 2 array formulas like that. SUMPRODUCT
is somewhat more efficient, if you would use an array formula you could have
written it like

=SUM((pcp<"")*(pcp<5.5%)*(pcp-5.5%)*(classification=B38))

or

=SUM(IF(pcp<"",IF(pcp<5.5%,IF(pcp-5.5%,IF(classification=B38,1,0)))))


both need to be array entered


--
Regards,

Peo Sjoblom

"Peo Sjoblom" wrote in message
...
=SUMPRODUCT(--(classification=B38),--(pcp<""),--(pcp<5.5%),--(pcp-5.5%))

btw, the less than character should be greater than -5.5% in the second
part of your formula. The formula I gave you can be entered normally


--
Regards,

Peo Sjoblom



"Saintsman" wrote in message
...
I need to count the number of values between -5.5% & +5.5%.
I use named ranges pcp & classification (classification is linked to a
drop
down list)

={SUM(IF(pcp<5.5%,IF(classification=B38,1,0)))-SUM(IF(pcp<-5.5%,IF(classification=B38,1,0)))}

The formula works nearly OK except that it counts NULL values. I can have
0
values ocasionally which need to be included, but not empty cells
Can anyone help?

Saintsman





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default Ignor null in count

Thanks very much for this - made life much simpler for me

Saintsman

"Peo Sjoblom" wrote:

Nevermind, your formula is of course correct except for the blanks, I didn't
even notice that you were subtracting the second string. Regardless even if
the formula is correct when it comes to finding values between 5.5% -5.5% it
doesn't really make any sense using 2 array formulas like that. SUMPRODUCT
is somewhat more efficient, if you would use an array formula you could have
written it like

=SUM((pcp<"")*(pcp<5.5%)*(pcp-5.5%)*(classification=B38))

or

=SUM(IF(pcp<"",IF(pcp<5.5%,IF(pcp-5.5%,IF(classification=B38,1,0)))))


both need to be array entered


--
Regards,

Peo Sjoblom

"Peo Sjoblom" wrote in message
...
=SUMPRODUCT(--(classification=B38),--(pcp<""),--(pcp<5.5%),--(pcp-5.5%))

btw, the less than character should be greater than -5.5% in the second
part of your formula. The formula I gave you can be entered normally


--
Regards,

Peo Sjoblom



"Saintsman" wrote in message
...
I need to count the number of values between -5.5% & +5.5%.
I use named ranges pcp & classification (classification is linked to a
drop
down list)

={SUM(IF(pcp<5.5%,IF(classification=B38,1,0)))-SUM(IF(pcp<-5.5%,IF(classification=B38,1,0)))}

The formula works nearly OK except that it counts NULL values. I can have
0
values ocasionally which need to be included, but not empty cells
Can anyone help?

Saintsman








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Ignor null in count

Thanks for the feedback


--
Regards,

Peo Sjoblom



"Saintsman" wrote in message
...
Thanks very much for this - made life much simpler for me

Saintsman

"Peo Sjoblom" wrote:

Nevermind, your formula is of course correct except for the blanks, I
didn't
even notice that you were subtracting the second string. Regardless even
if
the formula is correct when it comes to finding values between 5.5% -5.5%
it
doesn't really make any sense using 2 array formulas like that.
SUMPRODUCT
is somewhat more efficient, if you would use an array formula you could
have
written it like

=SUM((pcp<"")*(pcp<5.5%)*(pcp-5.5%)*(classification=B38))

or

=SUM(IF(pcp<"",IF(pcp<5.5%,IF(pcp-5.5%,IF(classification=B38,1,0)))))


both need to be array entered


--
Regards,

Peo Sjoblom

"Peo Sjoblom" wrote in message
...
=SUMPRODUCT(--(classification=B38),--(pcp<""),--(pcp<5.5%),--(pcp-5.5%))

btw, the less than character should be greater than -5.5% in the
second
part of your formula. The formula I gave you can be entered normally


--
Regards,

Peo Sjoblom



"Saintsman" wrote in message
...
I need to count the number of values between -5.5% & +5.5%.
I use named ranges pcp & classification (classification is linked to a
drop
down list)

={SUM(IF(pcp<5.5%,IF(classification=B38,1,0)))-SUM(IF(pcp<-5.5%,IF(classification=B38,1,0)))}

The formula works nearly OK except that it counts NULL values. I can
have
0
values ocasionally which need to be included, but not empty cells
Can anyone help?

Saintsman







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
CONTINUOUS FORMS IGNOR PAGE BREAKS wiiroger Setting up and Configuration of Excel 0 April 9th 07 10:50 PM
Sum if not null Fred Smith Excel Discussion (Misc queries) 5 November 10th 06 12:14 AM
COUNTIF says Null = Blank but Blank < Null Epinn Excel Worksheet Functions 4 October 25th 06 08:03 PM
cell value based on null/not null in another cell spence Excel Worksheet Functions 1 February 18th 06 11:49 PM
Count number of days between dates BUT IF null to current date kathi Excel Worksheet Functions 1 February 14th 06 04:11 PM


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