Need help adapting a formula

mattbird

Active Member
Joined
Oct 15, 2013
Messages
305
Office Version
  1. 2016
Hi,

I'm currently producing an attendance list and recording a rolling percentage. I am using the following formula:

=IF(COUNTIFS($D11:$O11,"")=12,0,SUM(COUNTIFS($D11:$O11,{1,"D"}))/$U11) - inputted in cell V11 of table.

The formula work, but I would like to adapt it.

My table has the following key:

1 = attended ( this is counted in cell P11)
0 = did not attend (this is counted in cell S11)
A = Apologies (this is counted in cell R11)
D = Deputy (this is counted in cell Q11)

In cell U11 I have a sum to add P11:S11, which give me a total for the formula above.

I have added a new cell T11 which counts 'N' (not required) when placed in any cell D11:O11 and I don't want 'N' to affect the percentage. If all the cells D11:O11 are empty and I place an 'N' in any of them cells my percentage cell V11 returns #DIV/0! when I need it to show 0%.

example 1:

Cell: D11 E11 F11 G11 H11 I11 J11 K11 L11 M11 N11 O11 V11 (formula cell)
input: 1 100%

example 2:

Cell: D11 E11 F11 G11 H11 I11 J11 K11 L11 M11 N11 O11 V11 (formula cell)
input: 1 1 100%

example 3:

Cell: D11 E11 F11 G11 H11 I11 J11 K11 L11 M11 N11 O11 V11 (formula cell)
input: 1 0 50%

example 4:

Cell: D11 E11 F11 G11 H11 I11 J11 K11 L11 M11 N11 O11 V11 (formula cell)
input: 1 N 100%

example 5:

Cell: D11 E11 F11 G11 H11 I11 J11 K11 L11 M11 N11 O11 V11 (formula cell)
input: N 1 100%

However,

example 6:

Cell: D11 E11 F11 G11 H11 I11 J11 K11 L11 M11 N11 O11 V11 (formula cell)
input: N #DIV/0! would like it to show 0%

How do I change the formula to not see N, if you understand what I mean.

I hope this make sense, as it hard to explain.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,224,889
Messages
6,181,608
Members
453,055
Latest member
cope7895

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