메인 컨텐츠로 가기

Excel에서 주말이나 공휴일을 제외한 두 날짜 사이의 순 근무 시간을 계산하는 방법은 무엇입니까?

많은 회사에서 직원은 근무 시간으로 급여를받습니다. 하루의 순 근무 시간을 계산하는 것은 쉽지만 날짜 범위의 순 시간을 계산하는 것은 어떻습니까? 이를 위해이 기사에서는 Excel에서 주말과 공휴일을 제외한 두 날짜 사이의 순 근무 시간을 계산하는 공식을 소개합니다.

주말 제외 근무일 계산

주말 / 공휴일 제외 근무 시간 계산


화살표 블루 오른쪽 거품 주말 제외 근무일 계산

이 부분에서는 주말을 제외한 두 날짜 시간 사이의 근무일을 계산하는 공식을 소개합니다.

1. 시작 날짜 시간과 종료 날짜 시간을 입력 할 두 개의 셀을 선택하고 마우스 오른쪽 버튼을 클릭하여 선택합니다. 셀 서식 컨텍스트 메뉴를 형성합니다. 스크린 샷보기 :
doc 순 작업 시간 1

2. 에서 셀 서식 대화 상자에서 번호 탭을 선택 관습 양식하다 범주 목록을 입력하고 m / d / yyyy h : mm 타입 오른쪽 섹션의 텍스트 상자. 스크린 샷보기 :
doc 순 작업 시간 2

3. 클릭 OK. 그리고 시작 날짜 시간과 종료 날짜 시간을 두 개의 셀에 별도로 입력하십시오. 스크린 샷보기 :
doc 순 작업 시간 3

4. 예를 들어이 두 셀 (C13) 옆의 셀에 다음 수식을 입력합니다. =NETWORKDAYS(A13,B13)-1-MOD(A13,1)+MOD(B13,1), 그리고 언론 엔터 버튼 키를 누르면 사용자 정의 형식으로 결과를 얻고 결과 셀을 선택한 다음 탭을 클릭하고 숫자 형식 일반을 선택하여 올바른 형식으로 형식을 지정하십시오. 스크린 샷보기 :
doc 순 작업 시간 4


화살표 블루 오른쪽 거품 주말 / 공휴일 제외 근무 시간 계산

주말 또는 공휴일을 제외한 순 근무 시간을 계산하려면 다음과 같이 할 수 있습니다.

주말을 제외한 순 근무 시간 계산

1. 두 개의 셀을 선택하고 사용자 지정 형식 m / d / yyyy h : mm으로 서식을 지정한 다음 시작 날짜 시간과 종료 날짜 시간을 입력합니다. 스크린 샷보기 :
doc 순 작업 시간 5

doc 순 작업 시간 6

2. 예를 들어 셀 C2 옆에 다음 공식을 입력합니다.
=(NETWORKDAYS(A2,B2)-1)*("17:30"-"8:30")+IF(NETWORKDAYS(B2,B2),MEDIAN(MOD(B2,1),"17:30","8:30"),"17:30")-MEDIAN(NETWORKDAYS(A2,A2)*MOD(A2,1),"17:30","8:30"),
키를 눌러 엔터 버튼 키를 누르면 숫자 문자열이 표시됩니다. 스크린 샷보기 :
doc 순 작업 시간 7

3. 숫자 문자열을 마우스 오른쪽 버튼으로 클릭하고 셀 서식 상황에 맞는 메뉴에서 셀 서식 대화 상자에서 선택하십시오. 관습 형태 범주 아래에 나열 Number 탭을 입력하고 [h] : mm 입력 텍스트 상자에. 스크린 샷보기 :
doc 순 작업 시간 8

4. 클릭 OK. 이제 주말을 제외한 두 날짜 사이의 순 근무 시간이 계산됩니다.
doc 순 작업 시간 9

: 공식에서 A2는 시작 날짜 시간, B2는 종료 날짜 시간, 8:30 및 17:30은 매일 일반적인 시작 시간과 종료 시간이며 필요에 따라 변경할 수 있습니다.

주말 및 공휴일을 제외한 순 근무 시간 계산

1. 위와 동일하게 두 개의 셀을 선택하고 사용자 정의 형식으로 서식 지정 m / d / yyyy h : mm을 클릭하고 시작 날짜 시간과 종료 날짜 시간을 입력하십시오.
doc 순 작업 시간 10

2. 빈 셀을 선택하고 여기에 공휴일 날짜를 입력합니다. 여기에는 3 개의 공휴일이 있으며 H1 : H3에 별도로 입력합니다. 스크린 샷보기 :
doc 순 작업 시간 11

3. 계산 된 결과를 배치 할 빈 셀 (예 : C2)을 선택합니다.
=(NETWORKDAYS.INTL(A2,B2,11,H$1:H$3)-1)*("17:30"-"8:30")+IF(NETWORKDAYS.INTL(B2,B2,11,H$1:H$3),MEDIAN(MOD(B2,1),"8:30","17:30"),"17:30")-MEDIAN(NETWORKDAYS.INTL(A2,A2,11,H$1:H$3)*MOD(A2,1),"8:30","17:30"),
키를 누릅니다 엔터 버튼 키, 숫자 문자열을 가져 와서 사용자 지정 형식으로 서식을 지정합니다. [h] : mm. 스크린 샷보기 :
doc 순 작업 시간 12

: 공식에서 A2는 시작 날짜 시간, B2는 종료 날짜 시간, 8:30 및 17:30은 각 요일의 일반적인 시작 시간과 종료 시간, H1 : H3은 휴일 셀이며 변경할 수 있습니다. 당신이 필요로.

Excel의 날짜 / 시간에 일 / 년 / 월 / 시간 / 분 / 초를 쉽게 추가

셀에 날짜 시간 형식 데이터가 있고 이제이 날짜에 일, 년, 월, 시간, 분 또는 초를 추가해야한다고 가정합니다. 일반적으로 수식 사용은 모든 Excel 사용자에게 첫 번째 방법이지만 모든 수식을 기억하기는 어렵습니다. 와 Excel 용 Kutools날짜 및 시간 도우미 유틸리티를 사용하면 날짜 시간에 일, 년, 월 또는 시간, 분 또는 초를 쉽게 추가 할 수 있으며, 공식을 전혀 기억하지 않고도 주어진 생일을 기준으로 날짜 차이 또는 나이를 계산할 수 있습니다. 30일 안에 모든 기능을 갖춘 무료 평가판을 보려면 클릭하세요!
문서 추가시 분 초
 
Excel 용 Kutools : 300 개 이상의 편리한 Excel 추가 기능으로 30 일 동안 제한없이 무료로 사용해 볼 수 있습니다.

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (67)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This formula is very good. Does anyone know how I can convert this to SQL query?
This comment was minimized by the moderator on the site
it works
how to add lunch break?
This comment was minimized by the moderator on the site
This is very good, what if the shift time spans over 2 days (start time 17:00 to 02:00 next day)
This comment was minimized by the moderator on the site
Hi
Have recieved any update regarding for your questions because I am also finding for same
This comment was minimized by the moderator on the site
Can anyone help me how the formula would be if the work hours are from 8:00 pm to 5:00 am (20:00 to 5:00)?
This comment was minimized by the moderator on the site
Tried the same formula but it's showing negative values.
This comment was minimized by the moderator on the site
Anyone need this formula but for graveyard or night shift schedule?
This comment was minimized by the moderator on the site
Why is the Median function used in this formula? what is calculating
This comment was minimized by the moderator on the site
Hey, thanks for this formula.

But can we apply this formula for same dates.

For ex,
if start date and time is
" 15/11/20 11:10AM" and end date and time is "15 /11/20 11:25AM"
This comment was minimized by the moderator on the site
Hi, Pooja, use formula (M1 is the start time,M2 is the end time)
=(NETWORKDAYS(M1,M2)-1)*("17:30"-"8:30")+IF(NETWORKDAYS(M2,M2),MEDIAN(MOD(M2,1),"17:30","8:30"),"17:30")-MEDIAN(NETWORKDAYS(M1,M1)*MOD(M1,1),"17:30","8:30")
and format the result cell as time.
This comment was minimized by the moderator on the site
Hi, Sunny, thank you so much, this works perfectly now.
This comment was minimized by the moderator on the site
Hi the formula below works well with me to calculate the tame a task is taking from start to finish excluding a standard weekends of Saturday and Sunday off.
=(NETWORKDAYS(I7,J7)-1)*("18:00"-"8:30")+IF(NETWORKDAYS(J7,J7),MEDIAN(MOD(J7,1),"18:00","8:30"),"18:00")-MEDIAN(NETWORKDAYS(I7,I7)*MOD(I7,1),"18:00","8:30")

However, on Friday we would like to consider 3 working hours only (9:00-12:00), how can I insert it within the formula please? any idea?
This comment was minimized by the moderator on the site
Hi, Pierre, I have modified the formula:
=((NETWORKDAYS(A1,B1)-1)*("18:00"-"8:30")+IF(NETWORKDAYS(B1,B1),MEDIAN(MOD(B1,1),"18:00","8:30"),"18:00")-MEDIAN(NETWORKDAYS(A1,A1)*MOD(A1,1),"18:00","8:30"))-INT((WEEKDAY($A$1- 6)-$A$1+$B1)/7)*(("18:00"-"8:30")-("12:00"-"9:00"))
This comment was minimized by the moderator on the site
Thank you Sunny, but honestly the updated formula did not give the results properly, not sure if it requires additional adjustment:
Monday - Thursday 8:30-18:00 (working hours)
Friday 9:00-12:00 (working hours)
Saturday - Sunday Off
thank you
This comment was minimized by the moderator on the site
Hi, Pierre, I have tested the formula, it works for me. In the formula:
A1 is the start datetime, B1 is the end datetime, and both of the datetime cells are formated as mm/dd/yy hh:mm, then the result you need to format it as time format: 37:30:55.
https://www.extendoffice.com/images/stories/comments/sun-comment/doc-calculate-specific-work-hour.png
https://www.extendoffice.com/images/stories/comments/sun-comment/doc-calculate-specific-work-hour-2.png
This comment was minimized by the moderator on the site
hi sunny,

I have used the formulla and it is working well except for friday hald day calculation showing in negative hours. Kindly suggest

=((NETWORKDAYS(P9,R9,1)-1)*("15:00"-"07:00")+IF(NETWORKDAYS(R9,R9),MEDIAN(MOD(R9,1),"15:00","07:00"),"15:00")-MEDIAN(NETWORKDAYS(P9,P9)*MOD(P9,1),"15:00","07:00")-INT((WEEKDAY(P9-6)-P9+R9)/7)*(("15:00"-"7:00")-("11:30"-"7:00")))

Start time: 1/12/2024 11:51:02 AM
End Time: 1/12/2024 11:51:13 AM
Result: -3:30:00

Thanks
Nishanth
This comment was minimized by the moderator on the site
Dear all, I would like to ask you for help, I tried this formula for counting working hours between days (without weekends and holidays), but I receive the #Value! error.I formatted the cells as well.
 Start date in A2:  24.11.2021 11:05  <span style="letter-spacing: 0.2px; color: inherit; font-family: inherit; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;">   1.12.2021 11:05</span>Workday start in C2:    6:00Workday end  in D2:  18:00Holidays in E2 till E10:
1/1/21
4/2/21
4/5/21
5/1/21
5/13/21
5/24/21
10/3/21
12/25/21
12/26/21
    
I used the following formula:   <span style="letter-spacing: 0.2px; color: inherit; font-family: inherit; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit; font-weight: inherit;">#Value! error, can you please advise?</span>
This comment was minimized by the moderator on the site
Hello Sir,
My predecessor has set below formula.I am not getting  what is "Holidays[#All]", not getting where he has set this.
Please let me know.....


=ABS(IF([@Priority]<3,settings!$F$2-K3,(((NETWORKDAYS(K3,settings!$F$2,Holidays[#All]))*((settings!$B$3-settings!$B$2)*24)-IF(AND(NETWORKDAYS(K3,K3,settings!$D$2:settings!$D$33)>0,(K3-INT(K3))*24>(settings!$B$2-INT(settings!$B$2))*24,(K3-INT(K3))*24<(settings!$B$3-INT(settings!$B$3))*24),((K3-INT(K3))*24)-((settings!$B$2-INT(settings!$B$2))*24),0)-IF(AND(NETWORKDAYS(settings!$F$2,settings!$F$2,settings!$D$2:settings!$D$33)>0,(settings!$F$2-INT(settings!$F$2))*24<(settings!$B$3-INT(settings!$B$3))*24,(settings!$F$2-INT(settings!$F$2))*24>(settings!$B$2-INT(settings!$B$2))*24),((settings!$B$3-INT(settings!$B$3))*24)-((settings!$F$2-INT(settings!$F$2))*24),0)-IF(AND(NETWORKDAYS(K3,K3,settings!$D$2:settings!$D$33)>0,(K3-INT(K3))*24>(settings!$B$3-INT(settings!$B$3))*24),(settings!$B$3-settings!$B$2)*24,0)-IF(AND(NETWORKDAYS(settings!$F$2,settings!$F$2,settings!$D$2:settings!$D$33)>0,(settings!$F$2-INT(settings!$F$2))*24<(settings!$B$2-INT(settings!$B$2))*24),(settings!$B$3-settings!$B$2)*24,0))/24)))
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations