Cell Formatting Help

cionnaith

Board Regular
Joined
Mar 9, 2010
Messages
52
Hi.

I am trying to make a cell return a blank (instead of a zero) and am having a problem. I have three cells that can have either "yes" or "no" entered in them. I need to calculate the proportion of total yes's from the three. Another cell (in column L) that returns values for the three entry cells are formatted as follows:

=IF(J21="Yes",1,IF(J21="No",2,""))

so that if there is no selection, a blank cell is generated in the column L cell instead of a zero, which is perfect. What I need to do is to calculate the proportion of 1's from the three column L cells that generate 1's, 2's or an empty cell in another cell, but I need that cell to return an empty cell if there are no entries in any of the three "yes" or "no" input cells. Right now that cell has:

=COUNTIF(L19:L21,"=1")/3

Any help on how to get this to return an empty cell, instead of a zero, if all of the cells are empty, would be most appreciated.
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
you could start by using

Code:
=COUNTIF(D5:D9,"Yes")
=COUNTIF(D5:D9,"No")

modified to suit and avoid the multi IF's
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,896
Members
452,948
Latest member
Dupuhini

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