Remember Me?

#1
Posted to microsoft.public.excel.programming
 external usenet poster Posts: 2
Formula to determine the number of work hours per month

I am trying to figure out the summary of work hours for a month. The problem is that we work 24hrs on Mon to Thu and on Fridays we only work 8hrs.
Therefore a short month will have less hours than a long month and a month with more Fridays will have less hours than other months.

per above schedule.

I have named a certain cell "Month_no". The number in the cell is changing according to a macro. The formula should refer to the name: Month_no and determine the number of hours for that specific month.

Thanks for helping
#2
Posted to microsoft.public.excel.programming
 external usenet poster Posts: 3,872
Formula to determine the number of work hours per month

Hi,

Am Mon, 7 Jun 2021 02:46:45 -0700 (PDT) schrieb sicelo matambo:

I am trying to figure out the summary of work hours for a month. The problem is that we work 24hrs on Mon to Thu and on Fridays we only work 8hrs.
Therefore a short month will have less hours than a long month and a month with more Fridays will have less hours than other months.

per above schedule.

I have named a certain cell "Month_no". The number in the cell is changing according to a macro. The formula should refer to the name: Month_no and determine the number of hours for that specific month.

the number of the month in A1.
Then try:

=SUMPRODUCT((WEEKDAY(ROW(INDIRECT(DATE(2021,A1,1)& ":"&EOMONTH(DATE(2021,A1,1),0))),2)<5)*24)+SUMPROD UCT((WEEKDAY(ROW(INDIRECT(DATE(2021,A1,1)&":"&EOMO NTH(DATE(2021,A1,1),0))),2)=5)*8)

Regards
Claus B.
--
Windows10

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

 Similar Threads Thread Thread Starter Forum Replies Last Post mstieler Excel Discussion (Misc queries) 4 July 18th 07 10:12 PM Eric Excel Discussion (Misc queries) 5 March 8th 07 12:04 AM Eric Excel Worksheet Functions 1 March 7th 07 04:00 PM leitek.com Excel Programming 2 March 7th 06 08:36 PM jeanette.rimmer Excel Worksheet Functions 2 July 15th 05 11:53 AM

All times are GMT +1. The time now is 05:59 PM.