Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default formula to count number of two different non-numeric responses

having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default formula to count number of two different non-numeric responses

=COUNTIF(A1:A20,"YES")
=COUNTIF(A1:A20,"NA")

--
Gary''s Student - gsnu200774


"cookie's mom" wrote:

having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default formula to count number of two different non-numeric responses

Try this:

=SUM(COUNTIF(A1:A10,{"yes","na"}))

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

Regards,

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

"cookie's mom" wrote in message
...
having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default formula to count number of two different non-numeric responses

=countif(range,"Yes")+countif(range,"NA")

Regards,
Fred

"cookie's mom" wrote in message
...
having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default formula to count number of two different non-numeric responses

Ron,

That's a very interesting solution. I do not fully understand what the
{"yes", "na"} does and why a SUM(..) is required around the COUNTIF. Would
you mind teaching me, please?

I tried substituting the list in your formula {"yes", "na"} by a range eg
{D1:D2} where these cells would hold the values "yes" and "na". but that
wouldn't work.

Is there a way how to apply this extended flexiility to your formula?

"Ron Coderre" wrote:

Try this:

=SUM(COUNTIF(A1:A10,{"yes","na"}))

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

Regards,

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

"cookie's mom" wrote in message
...
having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default formula to count number of two different non-numeric responses

Ha, I solved on epart of the challenge: ctrl-shift-enter makes the formula
work with a range

Still I am not sure about the Sum(...)

"Michael R" wrote:

Ron,

That's a very interesting solution. I do not fully understand what the
{"yes", "na"} does and why a SUM(..) is required around the COUNTIF. Would
you mind teaching me, please?

I tried substituting the list in your formula {"yes", "na"} by a range eg
{D1:D2} where these cells would hold the values "yes" and "na". but that
wouldn't work.

Is there a way how to apply this extended flexiility to your formula?

"Ron Coderre" wrote:

Try this:

=SUM(COUNTIF(A1:A10,{"yes","na"}))

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

Regards,

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

"cookie's mom" wrote in message
...
having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default formula to count number of two different non-numeric responses

Highlight the characters COUNTIF(A1:A10,{"yes","na"}) in the formula bar and hit
F9.

You'll see something like
{2,4}

It's an array of values.

You're using =sum() to add them up.


Michael R wrote:

Ha, I solved on epart of the challenge: ctrl-shift-enter makes the formula
work with a range

Still I am not sure about the Sum(...)

"Michael R" wrote:

Ron,

That's a very interesting solution. I do not fully understand what the
{"yes", "na"} does and why a SUM(..) is required around the COUNTIF. Would
you mind teaching me, please?

I tried substituting the list in your formula {"yes", "na"} by a range eg
{D1:D2} where these cells would hold the values "yes" and "na". but that
wouldn't work.

Is there a way how to apply this extended flexiility to your formula?

"Ron Coderre" wrote:

Try this:

=SUM(COUNTIF(A1:A10,{"yes","na"}))

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

Regards,

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

"cookie's mom" wrote in message
...
having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...




--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default formula to count number of two different non-numeric responses

ps. Hit escape after you've see the array.

Or hit Ctrl-z (edit|undo) to get the formula back to what it was.

Michael R wrote:

Ha, I solved on epart of the challenge: ctrl-shift-enter makes the formula
work with a range

Still I am not sure about the Sum(...)

"Michael R" wrote:

Ron,

That's a very interesting solution. I do not fully understand what the
{"yes", "na"} does and why a SUM(..) is required around the COUNTIF. Would
you mind teaching me, please?

I tried substituting the list in your formula {"yes", "na"} by a range eg
{D1:D2} where these cells would hold the values "yes" and "na". but that
wouldn't work.

Is there a way how to apply this extended flexiility to your formula?

"Ron Coderre" wrote:

Try this:

=SUM(COUNTIF(A1:A10,{"yes","na"}))

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

Regards,

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

"cookie's mom" wrote in message
...
having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...




--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default formula to count number of two different non-numeric responses

Very interesting & useful!, thank you

"Dave Peterson" wrote:

ps. Hit escape after you've see the array.

Or hit Ctrl-z (edit|undo) to get the formula back to what it was.

Michael R wrote:

Ha, I solved on epart of the challenge: ctrl-shift-enter makes the formula
work with a range

Still I am not sure about the Sum(...)

"Michael R" wrote:

Ron,

That's a very interesting solution. I do not fully understand what the
{"yes", "na"} does and why a SUM(..) is required around the COUNTIF. Would
you mind teaching me, please?

I tried substituting the list in your formula {"yes", "na"} by a range eg
{D1:D2} where these cells would hold the values "yes" and "na". but that
wouldn't work.

Is there a way how to apply this extended flexiility to your formula?

"Ron Coderre" wrote:

Try this:

=SUM(COUNTIF(A1:A10,{"yes","na"}))

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

Regards,

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

"cookie's mom" wrote in message
...
having trouble with this - need help on what formula to count the total of
two different non-numeric values in a range, i.e., "Yes" and "NA" - trying
COUNTIF, but having trouble...




--

Dave Peterson

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 to count number of sequential days in a row andreas Excel Worksheet Functions 2 July 25th 07 12:34 PM
formula to count number of months that have passed Dave F Excel Discussion (Misc queries) 5 October 8th 06 12:31 PM
Count Intervals of 1 Numeric value in a Row and Return Count down Column Sam via OfficeKB.com Excel Worksheet Functions 8 October 4th 05 04:37 PM
Count Intervals of 2 Numeric values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 12 September 24th 05 10:58 PM
Formula to count number of dates in an array Lilasviolet Excel Worksheet Functions 2 April 7th 05 07:44 PM


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