Count Duty Fall in Holiday List

limtat

New Member
Joined
Oct 25, 2014
Messages
2
Hi,

I making calendar by month for scheduling our employee duty. i used letter "D". I manage counting total letter "D" during weekday and weekend by using =sumproduct((weekeday(range_date,2)>5*(range_cell="D")). but my problem is i cannot count if employee is on duty during public holiday. someone can help me to solve this problem.

Thanks in advance.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Why you do not mark "D" if any employee works on Holiday ? This will solve your problem easily.
If the rate for working on Holiday is higher, instead of "D", use another letter, so can use formula accordingly.
Regards,
 
Upvote 0
Hi,

I making calendar by month for scheduling our employee duty. i used letter "D". I manage counting total letter "D" during weekday and weekend by using =sumproduct((weekeday(range_date,2)>5*(range_cell="D")). but my problem is i cannot count if employee is on duty during public holiday. someone can help me to solve this problem.

Thanks in advance.

Let Holidays refer to a range housing public holiday dates.
Rich (BB code):
=SUMPRODUCT(
  --(weekeday(range_date,2)>5),
  --(range_cell="D"),
  1-ISNUMBER(MATCH(range_date,Holidays,0)))

Is this what you are after?
 
Upvote 0
Let Holidays refer to a range housing public holiday dates.
Rich (BB code):
=SUMPRODUCT(
  --(weekeday(range_date,2)>5),
  --(range_cell="D"),
  1-ISNUMBER(MATCH(range_date,Holidays,0)))

Is this what you are after?

Im still cant get the value if i enter "D" on holiday cell. i create range of holiday date as "Holidays". any other solution?
 
Upvote 0
Im still cant get the value if i enter "D" on holiday cell. i create range of holiday date as "Holidays". any other solution?

I presume that
Rich (BB code):
=SUMPRODUCT(
  --(weekday(range_date,2)>5),
  --(range_cell="D"))
gives the same result as the formula you had, which counts weekend days that are marked with D. The Holidays range is supposed to contain dates which are public holidays. So:
Rich (BB code):
=SUMPRODUCT(
  --(weekday(range_date,2)>5),
  --(range_cell="D"),
  1-ISNUMBER(MATCH(range_date,Holidays,0)))
excludes days from the count, which are public holidays. I don't understand what you mean by "enter "D" on holiday cell". Recall that the Holidays range is a separate range in which you enter DATES on which public holidays are held. So try to describe what you did get before you issue a call for "any other solution".
 
Upvote 0

Forum statistics

Threads
1,215,693
Messages
6,126,248
Members
449,305
Latest member
Dalyb2

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