PC Review


Reply
Thread Tools Rate Thread

countif in different columns

 
 
cox ng \(1\)
Guest
Posts: n/a
 
      14th Mar 2006
I wish to sum cells in two different columns and then divide that sum by
those cells that have a number greater than "0" to obtain an average. I
can do this with sucess if I remain in the same column by
=SUM(E2:E14)/COUNTIF(E2:E14,">.01").

I cannot find the proper formula if I add cells from a different column.
For example I've tried
=SUM(E2:E14,K2:K14)/COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01").

Any suggestions?

Thank you for your time and help.

Regards,
Gary


 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      14th Mar 2006
try
=AVERAGE(E2:E14,K2:K14)
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"cox ng (1)" <(E-Mail Removed)> wrote in message
news:PxDRf.241183$oG.126061@dukeread02...
>I wish to sum cells in two different columns and then divide that sum by
>those cells that have a number greater than "0" to obtain an average. I
>can do this with sucess if I remain in the same column by
>=SUM(E2:E14)/COUNTIF(E2:E14,">.01").
>
> I cannot find the proper formula if I add cells from a different column.
> For example I've tried
> =SUM(E2:E14,K2:K14)/COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01").
>
> Any suggestions?
>
> Thank you for your time and help.
>
> Regards,
> Gary
>



 
Reply With Quote
 
RagDyer
Guest
Posts: n/a
 
      14th Mar 2006
You mention "greater then 0", then use ".01" in your formula.

The Average() function counts 0's, so just use your formula concept
*correctly*!
Just group your divisor by adding some parenthesis:

=SUM(E2:E14,K2:K14)/(COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01"))
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"cox ng (1)" <(E-Mail Removed)> wrote in message
news:PxDRf.241183$oG.126061@dukeread02...
> I wish to sum cells in two different columns and then divide that sum by
> those cells that have a number greater than "0" to obtain an average. I
> can do this with sucess if I remain in the same column by
> =SUM(E2:E14)/COUNTIF(E2:E14,">.01").
>
> I cannot find the proper formula if I add cells from a different column.
> For example I've tried
> =SUM(E2:E14,K2:K14)/COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01").
>
> Any suggestions?
>
> Thank you for your time and help.
>
> Regards,
> Gary
>
>


 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      14th Mar 2006
try this ARRAY formula which must be entered with ctrl+shift+enter
=AVERAGE(IF($E$2:$E$14>0,$E$2:$E$14))+IF($K$2:$K15>0,$K$2:$K$14)

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"cox ng (1)" <(E-Mail Removed)> wrote in message
news:PxDRf.241183$oG.126061@dukeread02...
>I wish to sum cells in two different columns and then divide that sum by
>those cells that have a number greater than "0" to obtain an average. I
>can do this with sucess if I remain in the same column by
>=SUM(E2:E14)/COUNTIF(E2:E14,">.01").
>
> I cannot find the proper formula if I add cells from a different column.
> For example I've tried
> =SUM(E2:E14,K2:K14)/COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01").
>
> Any suggestions?
>
> Thank you for your time and help.
>
> Regards,
> Gary
>



 
Reply With Quote
 
cox ng \(1\)
Guest
Posts: n/a
 
      14th Mar 2006
This formula works as I was hoping. Thank you for the help.

Regards,
Gary

"RagDyer" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> You mention "greater then 0", then use ".01" in your formula.
>
> The Average() function counts 0's, so just use your formula concept
> *correctly*!
> Just group your divisor by adding some parenthesis:
>
> =SUM(E2:E14,K2:K14)/(COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01"))
> --
> HTH,
>
> RD
> ==============================================
> Please keep all correspondence within the Group, so all may benefit!
> ==============================================
>
>
> "cox ng (1)" <(E-Mail Removed)> wrote in message
> news:PxDRf.241183$oG.126061@dukeread02...
>> I wish to sum cells in two different columns and then divide that sum by
>> those cells that have a number greater than "0" to obtain an average. I
>> can do this with sucess if I remain in the same column by
>> =SUM(E2:E14)/COUNTIF(E2:E14,">.01").
>>
>> I cannot find the proper formula if I add cells from a different column.
>> For example I've tried
>> =SUM(E2:E14,K2:K14)/COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01").
>>
>> Any suggestions?
>>
>> Thank you for your time and help.
>>
>> Regards,
>> Gary
>>
>>

>



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      14th Mar 2006
Further testing says NO to this.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> try this ARRAY formula which must be entered with ctrl+shift+enter
> =AVERAGE(IF($E$2:$E$14>0,$E$2:$E$14))+IF($K$2:$K15>0,$K$2:$K$14)
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "cox ng (1)" <(E-Mail Removed)> wrote in message
> news:PxDRf.241183$oG.126061@dukeread02...
>>I wish to sum cells in two different columns and then divide that sum by
>>those cells that have a number greater than "0" to obtain an average. I
>>can do this with sucess if I remain in the same column by
>>=SUM(E2:E14)/COUNTIF(E2:E14,">.01").
>>
>> I cannot find the proper formula if I add cells from a different column.
>> For example I've tried
>> =SUM(E2:E14,K2:K14)/COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01").
>>
>> Any suggestions?
>>
>> Thank you for your time and help.
>>
>> Regards,
>> Gary
>>

>
>



 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      14th Mar 2006
But this does by replacing + with a comma

=AVERAGE(IF($E$2:$E$14>0,$E$2:$E$14)),IF($K$2:$K15>0,$K$2:$K$14)


--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Don Guillett" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Further testing says NO to this.
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Don Guillett" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> try this ARRAY formula which must be entered with ctrl+shift+enter
>> =AVERAGE(IF($E$2:$E$14>0,$E$2:$E$14))+IF($K$2:$K15>0,$K$2:$K$14)
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "cox ng (1)" <(E-Mail Removed)> wrote in message
>> news:PxDRf.241183$oG.126061@dukeread02...
>>>I wish to sum cells in two different columns and then divide that sum by
>>>those cells that have a number greater than "0" to obtain an average. I
>>>can do this with sucess if I remain in the same column by
>>>=SUM(E2:E14)/COUNTIF(E2:E14,">.01").
>>>
>>> I cannot find the proper formula if I add cells from a different column.
>>> For example I've tried
>>> =SUM(E2:E14,K2:K14)/COUNTIF(E2:E14,">.01")+COUNTIF(K2:K14,">.01").
>>>
>>> Any suggestions?
>>>
>>> Thank you for your time and help.
>>>
>>> Regards,
>>> Gary
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif using two columns? Scott Stedman Microsoft Excel Misc 6 7th May 2011 01:59 PM
COUNTIF with 2 columns J.A.1975 Microsoft Excel Worksheet Functions 2 28th Apr 2011 04:36 PM
Countif for 2 columns earlfj Microsoft Excel Worksheet Functions 3 27th Sep 2009 06:42 AM
countif in 2 columns Tonso Microsoft Excel Misc 4 23rd Oct 2007 05:51 PM
countif with two columns? viveleroi0 Microsoft Excel Worksheet Functions 1 30th Aug 2004 08:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:41 AM.