#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Advanced Apology

I've been searching the internet for the past 1.5 days and have yet to find
an example of the formula I'm looking for.... so if this is easy, I apologize
in advance.

I want a count of the number of cells where column "I" values = "NA" and
column "D" values = "0". In the example below, only the 2nd & 5th rows would
meet the criteria.

I D
NA 5
NA 0
xx/xx/xx 0
xx/xx/xx 0
NA 0
xx/xx/xx 7
NA 3

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Advanced Apology

Hi

=SUMPRODUCT(--($I$1:I100="NA"),--($D$1:$D$100=0),--($D$1:$D$100<""))


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Wilson" wrote in message
...
I've been searching the internet for the past 1.5 days and have yet to
find
an example of the formula I'm looking for.... so if this is easy, I
apologize
in advance.

I want a count of the number of cells where column "I" values = "NA" and
column "D" values = "0". In the example below, only the 2nd & 5th rows
would
meet the criteria.

I D
NA 5
NA 0
xx/xx/xx 0
xx/xx/xx 0
NA 0
xx/xx/xx 7
NA 3



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Advanced Apology

Hi,

Maybe

=SUMPRODUCT((I1:I7="NA")*(D1:D7=0))
which checks for zero
or if 0 is really like in your post
=SUMPRODUCT((I1:I7="NA")*(D1:D7="0"))

Mike

"Wilson" wrote:

I've been searching the internet for the past 1.5 days and have yet to find
an example of the formula I'm looking for.... so if this is easy, I apologize
in advance.

I want a count of the number of cells where column "I" values = "NA" and
column "D" values = "0". In the example below, only the 2nd & 5th rows would
meet the criteria.

I D
NA 5
NA 0
xx/xx/xx 0
xx/xx/xx 0
NA 0
xx/xx/xx 7
NA 3

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Advanced Apology

Good point I forgot about blank cells

"Arvi Laanemets" wrote:

Hi

=SUMPRODUCT(--($I$1:I100="NA"),--($D$1:$D$100=0),--($D$1:$D$100<""))


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Wilson" wrote in message
...
I've been searching the internet for the past 1.5 days and have yet to
find
an example of the formula I'm looking for.... so if this is easy, I
apologize
in advance.

I want a count of the number of cells where column "I" values = "NA" and
column "D" values = "0". In the example below, only the 2nd & 5th rows
would
meet the criteria.

I D
NA 5
NA 0
xx/xx/xx 0
xx/xx/xx 0
NA 0
xx/xx/xx 7
NA 3




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Advanced Apology

Thanks for the quick answers guys....

Both methods are returning "0"

This is data that I copied out of MSP. Would it matter if the entire column
(where the "NA" or "xx/xx/xx" is stored) was formatted to be a date. There
are around 5000 records.


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Advanced Apology

=SUMPRODUCT(--('Raw Data'!I4:I4902="NA"),--('Raw Data'!D4:D4902="0"),--('Raw
Data'!D4:D4902<""))

and

=SUMPRODUCT(('Raw Data'!I4:I4902="NA")*('Raw Data'!D4:D4902="0"))

returned ZEROS.

I am baffled
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Advanced Apology

Maybe you have all data as strings and there are leading/trailing spaces
(like "0 ", or "NA ")


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Wilson" wrote in message
...
=SUMPRODUCT(--('Raw Data'!I4:I4902="NA"),--('Raw
Data'!D4:D4902="0"),--('Raw
Data'!D4:D4902<""))

and

=SUMPRODUCT(('Raw Data'!I4:I4902="NA")*('Raw Data'!D4:D4902="0"))

returned ZEROS.

I am baffled



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Advanced Apology

Hi,

If you looking for ZERO remove the quotes

Is NA typed in or is it an error #N/A returned by a formula?

Mike

"Wilson" wrote:

=SUMPRODUCT(--('Raw Data'!I4:I4902="NA"),--('Raw Data'!D4:D4902="0"),--('Raw
Data'!D4:D4902<""))

and

=SUMPRODUCT(('Raw Data'!I4:I4902="NA")*('Raw Data'!D4:D4902="0"))

returned ZEROS.

I am baffled

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default thanks

NA is a value populated by my copy paste from MSProject. I don't believe it
is considered an error (i.e. there is no # in front of the NA). After the
last post, I went to my 'raw data' worksheet and removed all "NA" values from
the "I" column and used the following formula:

=SUMPRODUCT(I5:I5000="NA")

It returned zero.
I then populated 3 fields with "a" and used
=COUNTIF(I5:I5000,"a")
and it returned 3, so it worked.

In response to your comment on "if you are looking for zero..." I am looking
for the value "0" not an unpopulated zero. Should I use quotes or no?

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Advanced Apology

I just Copied and replaced the NA values and I'm still getting zero


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Advanced Apology

Try this:
=SUMPRODUCT(--(A2:A10="NA"),ISNUMBER(B2:B10)*(B2:B10=0))

or this:
=SUMPRODUCT((A2:A10="NA")*ISNUMBER(B2:B10)*(B2:B10 =0))

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"Wilson" wrote in message
...
I've been searching the internet for the past 1.5 days and have yet to
find
an example of the formula I'm looking for.... so if this is easy, I
apologize
in advance.

I want a count of the number of cells where column "I" values = "NA" and
column "D" values = "0". In the example below, only the 2nd & 5th rows
would
meet the criteria.

I D
NA 5
NA 0
xx/xx/xx 0
xx/xx/xx 0
NA 0
xx/xx/xx 7
NA 3


  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Advanced Apology


Second one worked.... THANKS!!!
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Advanced Apology

You're welcome.....I'm glad I could help.

Regards,

Ron
Microsoft MVP (Excel)


"Wilson" wrote in message
...

Second one worked.... THANKS!!!



  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Advanced Apology

have yet to find an example of the formula I'm looking for....

If you have Excel 2007, the newer formula might be:

=COUNTIFS(
A1:A7,"NA",
B1:B7,0)

I like to break up the ranges onto different lines, and take advantage of
Ctrl+Shift+U to toggle the expansion of the formula bar.
--
HTH :)
Dana DeLouis


"Wilson" wrote in message ...

I've been searching the internet for the past 1.5 days and have yet to find
an example of the formula I'm looking for.... so if this is easy, I apologize
in advance.

I want a count of the number of cells where column "I" values = "NA" and
column "D" values = "0". In the example below, only the 2nd & 5th rows would
meet the criteria.

I D
NA 5
NA 0
xx/xx/xx 0
xx/xx/xx 0
NA 0
xx/xx/xx 7
NA 3
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Advanced Apology

Hello,

...
or this:
=SUMPRODUCT((A2:A10="NA")*ISNUMBER(B2:B10)*(B2:B10 =0))
...


Funny. I thought of
=SUMPRODUCT(--(PROPER(A2:A10)="NA"),--(--(B2:B10)=0))

[Just in case of some " NA" or "NA " etc.]

Have fun,
Bernd
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
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) shadestreet Excel Discussion (Misc queries) 2 July 21st 06 03:04 PM
Apology for the "ddd" post Bible John Excel Discussion (Misc queries) 5 February 28th 06 01:55 AM
Apology pky8484 Excel Worksheet Functions 1 January 11th 06 05:18 PM
advanced if????? taran Excel Worksheet Functions 5 August 3rd 05 04:38 PM
Advanced use of IF Backdoor Cover Excel Worksheet Functions 6 June 2nd 05 08:47 PM


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