Counting blank cells with Conditions

raisedwell

New Member
Joined
Mar 4, 2010
Messages
22
I need help with a formula that would allow me to determine the following:

I have a workbook where am using Sheet1 as a dashboard that will help determine how many questions were not answered found on Sheet2.

Scenario:
Sheet 2 has a comprehensive list of questions to which Column A contains the list of 50 questions, Column B should contain 50 responses. If they they provide YES to the first question, (Sheet2, B1) then the rest of the questions are out of scope and should not be counted, otherwise, if the first question is answered NO, then count the number of blank cells between Sheet2, B1 thru B50

I can obtain the number of blank cells by using =COUNTBLANK(Sheet2!A1:A50) however, I cannot figures out how to add a condition of making the remaining questions out of scope if the first question is answered YES.

Thanks in advance for any help provided.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
How about
=if(Sheet2!B1="NO", COUNTBLANK(Sheet2!B1:B50),"")
 
Upvote 0
Thank you. I just realized that the possible responses I have that they can choose is Yes, No, and N/A.

While the formula does return the number of unanswered cells if NO is chosen, however if they say YES it returns a blank cell. (Due that other calculations also reference the cell of unanswered cells, I need to be able for if the answer is YES, then it returns 0 as unanswered questions.

Make sense?
 
Upvote 0
In that case change the "" at the end of the formula to 0
 
Upvote 0
Works perfectly for No.

YES - Returns 0
NO - Returns # of unanswered cells
N/A - Returns 0 (Need it to also return # of unanswered cells)

Or return # of unanswered cells unless answered YES.

I hope this helps. (I cannot thank you enough!)
 
Upvote 0
In that case try
=if(Sheet2!B1="Yes",0, COUNTBLANK(Sheet2!B1:B50))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

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