Problems with adapting a formula

Status
Not open for further replies.

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 etc 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:
TeamAprMayJunJulAugSepOctNovDecJanFebMarCount
'1'
Count
'D'
Count
'A'
Count
'0'
Count
'N'
Total
(P:S)
Attendance %
DEFGHIJKLMNOPQRSTUV
11Team A11200002100%
12Team
A
11111500005100%
13Team A1010010250%
14Team B10120010367%
15Team B1D110002100%
16Team C1A10100250%
17Team C110A1D031120757%
18Team D1N100011100%
19Team EN1100011100%
20Team FN11N10NDNN1A41115671%
21Team FN#DIV/0!
(needs to show 0%)
22Team FNNNN#DIV/0! (needs 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.
Duplicate to: Need help adapting a formula

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread. If you do not receive a response, you can "bump" it by replying to it yourself, though we advise you to wait 24 hours before doing so, and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,076
Messages
6,122,987
Members
449,093
Latest member
Mr Hughes

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