View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
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