Calculating Percentages Using Countif Function

TomJB2018

New Member
Joined
Aug 15, 2018
Messages
4
Hi,

I have Column G 'Release Date Met' which can be populated either Y or N.

I also have Column J 'Number of Incorrect Files Received' which is free text but will be populated with numbers but may be left blank.

I am looking to calculate what percentage of the total responses in Column G are 'Y' and have done this using the formula: =COUNTIF(G4:G985,"Y")/COUNTA(G4:G985)

However, I don't want this percentage to count any data from column G where the same row in column J has a value other than 0.

Is there a way of amending this COUNTIF formula to exclude such values?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi, See if this does it:

=COUNTIFS(G4:G985,"Y",J4:J985,"0")/COUNTIFS(G4:G985,"<>",J4:J985,"0")
 
Upvote 0
Its because this equals 0

COUNTIFS(G4:G985,"<>",J4:J985,"0")

which means you have no cells in the range G4:G985 that have a value when the cells in the corresponding row in column J equal 0.
 
Upvote 0
Its because this equals 0

COUNTIFS(G4:G985,"<>",J4:J985,"0")

which means you have no cells in the range G4:G985 that have a value when the cells in the corresponding row in column J equal 0.

I've now added zero into all blank cells in column J and that's done the trick. Thanks!
 
Upvote 0

Forum statistics

Threads
1,214,630
Messages
6,120,634
Members
448,973
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top