How many sales days in a month

hillmas83

New Member
Joined
Aug 23, 2017
Messages
6
i am looking for a way of counting how many sales days in any month, assuming the below information

Day Value
Sunday0.125
Monday1.000
Tuesday1.000
Wednesday1.000
Thursday1.000
Friday1.000
Saturday0.250
Bank Holiday0.250

<colgroup><col><col></colgroup><tbody>
</tbody>

so, using the above August 2017 would equal 23.75 (with the UK bank holiday on 28/08).
I need to work out the sales days in each month of each year ongoing.

I was thinking of using some sort of formula such as -
SUMPRODUCT(N(TEXT(ROW(INDIRECT(A1&":"&EOMONTH(A1,0))),"ddd")="Sun"))*0.125
(where A1 refers to the first day in the given month) to count the sundays +saturdays etc but i cant figure out how to account for the bank holidays.



thanks
M
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Welcome to the Board!

I would use a formula with NETWORKDAYS, which counts the number of workdays (Monday-Friday) between two dates, taking holidays into account.
So, if your have the first day of the month in cell A1, and a named range called "Holidays" which contains a listing of your holidays, then these formulas should work:
First, find the End of Month of the month in cell A1 in cell B1 with this formula:
Code:
=EOMONTH(A1,0)
Then, here is the big formula.
Code:
=[COLOR=#ff0000]NETWORKDAYS(A1,B1,Holidays)[/COLOR]+[COLOR=#0000ff]((B1-A1-NETWORKDAYS(A1,B1,Holidays)+1)*0.25)[/COLOR]-[COLOR=#008000](SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1 & ":" & B1)))=1))*0.125) [/COLOR]
Note that are three parts to my formula. The first counts the Workdays. The second counts the weekends and holidays, and multiplies by 0.25. The third finds the Sundays, and subtracts an additional 0.125 (since Sundays should be 0.125 and not 0.25).

See here if you need to learn more about NETWORKDAYS function: MS Excel: How to use the NETWORKDAYS Function (WS)
 
Upvote 0
You are welcome!
Glad I was able to help.:)
 
Upvote 0

Forum statistics

Threads
1,216,172
Messages
6,129,290
Members
449,498
Latest member
Lee_ray

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