Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 192
Default need formula to add two different criteria in a range

I want to count the number of "yes" in a range and the number of "n/a" in a
range and get that total.
If I enter =sum(if(range,"yes"+"n/a")) I get "#Value"
If I enter =sum(if(range,"yes")+(range,"n/a")) I get "formula contains an
error"
I've tried several variations on this with sum, sumif, count, counta,
countif...
Can someone please give me a clue?? :D
Thanks, Meenie
--
Y****er
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default need formula to add two different criteria in a range

=COUNTIF(A1:A100,"yes")
if n/a was entered as text
=COUNTIF(A1:A100,"n/a")
if n/a was enterd with the NA() function
=SUMPRODUCT(--(ISNA(A1:A100)))

best wishes
--
www.stfx.ca/people/bliengme


"Meenie" wrote:

I want to count the number of "yes" in a range and the number of "n/a" in a
range and get that total.
If I enter =sum(if(range,"yes"+"n/a")) I get "#Value"
If I enter =sum(if(range,"yes")+(range,"n/a")) I get "formula contains an
error"
I've tried several variations on this with sum, sumif, count, counta,
countif...
Can someone please give me a clue?? :D
Thanks, Meenie
--
Y****er

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 192
Default need formula to add two different criteria in a range

yes and n/a are both entered as text.
I know how to count one or the other, how to I count the total occurence of
both within the range?
--
Y****er


"Bernard Liengme" wrote:

=COUNTIF(A1:A100,"yes")
if n/a was entered as text
=COUNTIF(A1:A100,"n/a")
if n/a was enterd with the NA() function
=SUMPRODUCT(--(ISNA(A1:A100)))

best wishes
--
www.stfx.ca/people/bliengme


"Meenie" wrote:

I want to count the number of "yes" in a range and the number of "n/a" in a
range and get that total.
If I enter =sum(if(range,"yes"+"n/a")) I get "#Value"
If I enter =sum(if(range,"yes")+(range,"n/a")) I get "formula contains an
error"
I've tried several variations on this with sum, sumif, count, counta,
countif...
Can someone please give me a clue?? :D
Thanks, Meenie
--
Y****er

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default need formula to add two different criteria in a range

Add the two functions together...
=COUNTIF(A1:A100,"yes")+COUNTIF(A1:A100,"n/a")

--
Best Regards,

Luke M
"Meenie" wrote in message
...
yes and n/a are both entered as text.
I know how to count one or the other, how to I count the total occurence
of
both within the range?
--
Y****er


"Bernard Liengme" wrote:

=COUNTIF(A1:A100,"yes")
if n/a was entered as text
=COUNTIF(A1:A100,"n/a")
if n/a was enterd with the NA() function
=SUMPRODUCT(--(ISNA(A1:A100)))

best wishes
--
www.stfx.ca/people/bliengme


"Meenie" wrote:

I want to count the number of "yes" in a range and the number of "n/a"
in a
range and get that total.
If I enter =sum(if(range,"yes"+"n/a")) I get "#Value"
If I enter =sum(if(range,"yes")+(range,"n/a")) I get "formula contains
an
error"
I've tried several variations on this with sum, sumif, count, counta,
countif...
Can someone please give me a clue?? :D
Thanks, Meenie
--
Y****er



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default need formula to add two different criteria in a range

This will work for those =na() errors:
=countif(a1:a100,"#n/a")

Bernard Liengme wrote:

=COUNTIF(A1:A100,"yes")
if n/a was entered as text
=COUNTIF(A1:A100,"n/a")
if n/a was enterd with the NA() function
=SUMPRODUCT(--(ISNA(A1:A100)))

best wishes
--
www.stfx.ca/people/bliengme

"Meenie" wrote:

I want to count the number of "yes" in a range and the number of "n/a" in a
range and get that total.
If I enter =sum(if(range,"yes"+"n/a")) I get "#Value"
If I enter =sum(if(range,"yes")+(range,"n/a")) I get "formula contains an
error"
I've tried several variations on this with sum, sumif, count, counta,
countif...
Can someone please give me a clue?? :D
Thanks, Meenie
--
Y****er


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default need formula to add two different criteria in a range

Hi Meenie

Try
=SUM(COUNTIF(A:A,{"Yes","n/a"}))

--
Jacob (MVP - Excel)


"Meenie" wrote:

I want to count the number of "yes" in a range and the number of "n/a" in a
range and get that total.
If I enter =sum(if(range,"yes"+"n/a")) I get "#Value"
If I enter =sum(if(range,"yes")+(range,"n/a")) I get "formula contains an
error"
I've tried several variations on this with sum, sumif, count, counta,
countif...
Can someone please give me a clue?? :D
Thanks, Meenie
--
Y****er

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 192
Default need formula to add two different criteria in a range

Perfect!! Thanks Jacob :)
--
Y****er


"Jacob Skaria" wrote:

Hi Meenie

Try
=SUM(COUNTIF(A:A,{"Yes","n/a"}))

--
Jacob (MVP - Excel)


"Meenie" wrote:

I want to count the number of "yes" in a range and the number of "n/a" in a
range and get that total.
If I enter =sum(if(range,"yes"+"n/a")) I get "#Value"
If I enter =sum(if(range,"yes")+(range,"n/a")) I get "formula contains an
error"
I've tried several variations on this with sum, sumif, count, counta,
countif...
Can someone please give me a clue?? :D
Thanks, Meenie
--
Y****er

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
formula for multiple criteria inc. date range J.Scargill Excel Worksheet Functions 4 March 23rd 10 11:20 AM
How can I define date range criteria in SUMIF formula? LisaR Excel Worksheet Functions 1 February 11th 10 08:13 AM
Criteria range in a Dcount formula pjo Excel Discussion (Misc queries) 0 June 27th 07 03:54 PM
How do I put a date range in the criteria of a countif formula? hlpmelrn Excel Discussion (Misc queries) 3 November 23rd 06 03:12 AM
use a date range as criteria in a countif formula mbparks Excel Worksheet Functions 3 January 2nd 05 11:06 PM


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