Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old June 7th 21, 10:46 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2021
Posts: 2
Default 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.

Please help me with a formula which determines the number of work hours per month as
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   Report Post  
Old June 9th 21, 09:53 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,872
Default 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.

Please help me with a formula which determines the number of work hours per month as
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
Microsoft 365 for business


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to get a Boolean formula to work month-to-month mstieler Excel Discussion (Misc queries) 4 July 18th 07 10:12 PM
How to determine the number of month between 2 periods? Eric Excel Discussion (Misc queries) 5 March 8th 07 12:04 AM
How to determine the number of month between 2 periods? Eric Excel Worksheet Functions 1 March 7th 07 04:00 PM
A formula or macro that determine the correct month leitek.com Excel Programming 2 March 7th 06 08:36 PM
Time functions, how do I work out number of hours jeanette.rimmer Excel Worksheet Functions 2 July 15th 05 11:53 AM


All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017