Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default percentage negative values in column

Hi, I want to calculate the % of negative values in a column, using a dynamic
range. i.e No. of negative values, divided by total number of values, X100,
to give a %. The following formula works, but is returning the wrong value:
=SUM(COUNTIF(INDIRECT("$C$13:C"&A2),"<0")/(COUNT(INDIRECT("$C$13:C"&"A2")))*100)
Can anyone spot what I've done wrong ? and/or a simpler way of doing the
same thing ?
Many Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default percentage negative values in column

Graham,

OK provided no text creeps into your range:-

=(COUNT(IF(C13:INDIRECT("C"&B1)<0,C13:INDIRECT("C" &B1),FALSE))/COUNTIF(C13:INDIRECT("B"&B1),"<"&""))*100

Mike

"Graham" wrote:

Hi, I want to calculate the % of negative values in a column, using a dynamic
range. i.e No. of negative values, divided by total number of values, X100,
to give a %. The following formula works, but is returning the wrong value:
=SUM(COUNTIF(INDIRECT("$C$13:C"&A2),"<0")/(COUNT(INDIRECT("$C$13:C"&"A2")))*100)
Can anyone spot what I've done wrong ? and/or a simpler way of doing the
same thing ?
Many Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default percentage negative values in column

To answer your question:
Can anyone spot what I've done wrong ?


Remove the quotations marks around the second A2 in your fromula.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Graham" wrote in message
...
Hi, I want to calculate the % of negative values in a column, using a
dynamic
range. i.e No. of negative values, divided by total number of values,
X100,
to give a %. The following formula works, but is returning the wrong
value:
=SUM(COUNTIF(INDIRECT("$C$13:C"&A2),"<0")/(COUNT(INDIRECT("$C$13:C"&"A2")))*100)
Can anyone spot what I've done wrong ? and/or a simpler way of doing the
same thing ?
Many Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default percentage negative values in column

Many Thanks!!

"Mike H" wrote:

Graham,

OK provided no text creeps into your range:-

=(COUNT(IF(C13:INDIRECT("C"&B1)<0,C13:INDIRECT("C" &B1),FALSE))/COUNTIF(C13:INDIRECT("B"&B1),"<"&""))*100

Mike

"Graham" wrote:

Hi, I want to calculate the % of negative values in a column, using a dynamic
range. i.e No. of negative values, divided by total number of values, X100,
to give a %. The following formula works, but is returning the wrong value:
=SUM(COUNTIF(INDIRECT("$C$13:C"&A2),"<0")/(COUNT(INDIRECT("$C$13:C"&"A2")))*100)
Can anyone spot what I've done wrong ? and/or a simpler way of doing the
same thing ?
Many Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default percentage negative values in column

=COUNTIF(INDIRECT("C13:C"&A2),"<0")/COUNT(INDIRECT("C13:C"&A2))*100

"Graham" wrote:

Hi, I want to calculate the % of negative values in a column, using a dynamic
range. i.e No. of negative values, divided by total number of values, X100,
to give a %. The following formula works, but is returning the wrong value:
=SUM(COUNTIF(INDIRECT("$C$13:C"&A2),"<0")/(COUNT(INDIRECT("$C$13:C"&"A2")))*100)
Can anyone spot what I've done wrong ? and/or a simpler way of doing the
same thing ?
Many Thanks

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
How do I format a column to show a negative percentage in red? swanny Excel Discussion (Misc queries) 1 May 2nd 07 04:38 PM
how do i sum up a column of time values but ignore negative values Croll New Users to Excel 1 October 11th 05 05:55 PM
how do i set up a column with negative values automatically? pooperdoodle Excel Discussion (Misc queries) 3 August 15th 05 09:23 PM
increase all values in a column by a percentage BayComp Excel Worksheet Functions 3 April 10th 05 12:59 PM
Stacked column, 2 values, percentage? [email protected] Charts and Charting in Excel 1 February 4th 05 12:18 PM


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