Trying to fix this formula....

jpkreider

New Member
Joined
Sep 22, 2017
Messages
15
So, I posted the other day asking for a formula and I got one that comes very close, but wasn't able to finish it off. Someone sent me a link but it didn't work so I was out of luck. What I'm trying to do is keep track of how many people are at work on each day. When someone is absent, I will mark their name under that date with a "D". So, I would like a formula that adds all the people on shift. Unfortunately, those names are not contiguous. I want to count certain people that are listed in cell D6,D8,D10,D16,D18,D20,D22. Here is the formula I have so far using ctrl+shift+enter.

=SUM(IF(CHOOSE({1,2,3,4,5,6,7},D6,D8,D10,D16,D18,D20,D22)=0,1))

As you can see, I am very close!! The only problem is that the answer I get is only "6", when I have 7 empty cells. When I enter a "D" into one of the above cells, the total number is reduced by one, which is great! But I want to start off with a total of 7 as an answer to the formula as opposed to 6. I'm not sure where the error in the formula is located. Any help would be greatly appreciated!
 

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
So, I posted the other day asking for a formula and I got one that comes very close, but wasn't able to finish it off. Someone sent me a link but it didn't work so I was out of luck. What I'm trying to do is keep track of how many people are at work on each day. When someone is absent, I will mark their name under that date with a "D". So, I would like a formula that adds all the people on shift. Unfortunately, those names are not contiguous. I want to count certain people that are listed in cell D6,D8,D10,D16,D18,D20,D22. Here is the formula I have so far using ctrl+shift+enter.

=SUM(IF(CHOOSE({1,2,3,4,5,6,7},D6,D8,D10,D16,D18,D20,D22)=0,1))

As you can see, I am very close!! The only problem is that the answer I get is only "6", when I have 7 empty cells. When I enter a "D" into one of the above cells, the total number is reduced by one, which is great! But I want to start off with a total of 7 as an answer to the formula as opposed to 6. I'm not sure where the error in the formula is located. Any help would be greatly appreciated!
I get 7 when I use that formula and nothing is in any of the cells. If you are getting 6, then there is something (maybe a space character) in one of the cells.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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