Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Need the correct formula

I am trying to count all the cells in a table that have a Category (first
column)of 'data' and a Priority (second column) of 'medium'. I can get a
count of all the cells with a value of 'medium' by using the 'CountIf'
function. But I can't seem to further restrict the count to just 'data' and
'medium'. I've tried the If-And function without sucess.

Thanks in advance
--
Rob K
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Need the correct formula

=sumproduct(--(a1:a10="Data"),--(b1:b10="medium"))

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

======
And if you're using xl2007, you may want to look at: =countifs()



Rob K wrote:

I am trying to count all the cells in a table that have a Category (first
column)of 'data' and a Priority (second column) of 'medium'. I can get a
count of all the cells with a value of 'medium' by using the 'CountIf'
function. But I can't seem to further restrict the count to just 'data' and
'medium'. I've tried the If-And function without sucess.

Thanks in advance
--
Rob K


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Need the correct formula

On 9 May, 23:30, Rob K wrote:
But I can't seem to further restrict the count to just 'data' and
'medium'. I've tried the If-And function without sucess.

Thanks in advance
--
Rob K


Col A.........ColB
Category....Priority

Add ColC
=A1&B1

This will concatenate the two values together. Copy this formula down.

Now you can COUNTIF... using 'datamedium'

HTH

Andrew

  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Need the correct formula

=Sumproduct(--(Category="Data"),--(Priority="Medium))

where Category and Priority are the range references for your two columns.

"Rob K" wrote:

I am trying to count all the cells in a table that have a Category (first
column)of 'data' and a Priority (second column) of 'medium'. I can get a
count of all the cells with a value of 'medium' by using the 'CountIf'
function. But I can't seem to further restrict the count to just 'data' and
'medium'. I've tried the If-And function without sucess.

Thanks in advance
--
Rob K

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Need the correct formula

The concat idea worked. Thank you very much!
--
Rob K


"loudfish" wrote:

On 9 May, 23:30, Rob K wrote:
But I can't seem to further restrict the count to just 'data' and
'medium'. I've tried the If-And function without sucess.

Thanks in advance
--
Rob K


Col A.........ColB
Category....Priority

Add ColC
=A1&B1

This will concatenate the two values together. Copy this formula down.

Now you can COUNTIF... using 'datamedium'

HTH

Andrew


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
Please Correct the formula Dummy Excel Discussion (Misc queries) 0 April 16th 07 12:20 AM
what is the correct formula to add a column with =sum Thomas Flaherty New Users to Excel 3 August 30th 06 05:00 AM
How do I correct this formula? Rebecca Excel Worksheet Functions 2 March 24th 06 02:37 AM
What's the correct formula? zubee Excel Discussion (Misc queries) 4 September 5th 05 04:45 PM
How I need correct formula, that no t rounding? TANDEX Excel Worksheet Functions 2 July 15th 05 07:30 PM


All times are GMT +1. The time now is 06:14 AM.

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"