跳到主要內容

如何計算Excel中兩個日期之間不包括星期日的天數?

如下面的屏幕快照所示,您有兩個給定的日期,一個是開始日期,另一個是結束日期,而工作是計算這兩個給定日期之間的不包括星期日的天,如何快速在Excel中完成呢?

文檔計數天(星期日除外)1

用公式計算不包括星期日的天數

使用Kutools for Excel計算兩個日期之間的特定工作日


用公式計算不包括星期日的天數

在這裡,我可以介紹一個公式,用於計算日期範圍內不包括星期日的天數。

選擇一個空白單元格,這裡是C2,然後鍵入此公式 =B2-A2-INT((B2-A2-WEEKDAY(B2)+1)/7) 進去,然後按 Enter 鍵,顯示日期。
文檔計數天(星期日除外)2

然後保持結果選中狀態,單擊“主頁”選項卡,然後轉到 聯繫電話 組以將單元格格式化為 or 聯繫電話 ,在 數字格式 下拉列表。
文檔計數天不包括星期天2

在公式中,A2是開始日期,B2是結束日期,您可以根據需要進行更改。


使用Kutools for Excel計算兩個日期之間的特定工作日

例如,如果您要計算不包括特定工作日的天數,請計算 星期五 在兩個日期之間,您可以使用 Excel的Kutools 計算特定工作日的數量 功能來完成它。

Excel的Kutools, 與以上 300 方便的功能,使您的工作更加輕鬆。 

免費安裝 Kutools for Excel,請執行以下操作:

1.選擇要放置計數結果的空白單元格,然後單擊 庫工具 > 公式助手 > 公式助手。 看截圖:
doc kutools計數工作日1

2。 在裡面 公式助手 對話框中,選中過濾器複選框,然後在旁邊的文本框中,鍵入“在“選擇公式”部分中,您可以看到所有包含已計數的實用程序名稱,選擇“計算特定工作日的數量”,然後在“參數輸入”部分中,單擊 文檔選擇按鈕 選擇開始日期和結束日期 開始日期結束日期 文本框,然後鍵入 6 進入旁邊的文本框 平日,如果您想計算另一個工作日,可以參考 備註。 看截圖:
doc kutools計數工作日2

3。 點擊 Ok,和數量 星期五 已經算了。
doc kutools計數工作日3

如果您只想計算兩個日期之間的工作日或週末,可以申請 兩個日期之間的工作天數 or 兩個日期之間的非工作天數 功能 公式幫助r對話框。

doc kutools計數工作日4
doc kutools計數工作日5

相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I have a 'starting day' in a cell and with 'Nos of days' at another cell . I want to calculate "end date" after excluding certain holidays from a cell range base on the 'number of days'. Please help me.
This comment was minimized by the moderator on the site
Hi, Hayung Jamatia, I think you want to add number of days to a date and excluding the holidays and weekends, if so, this article will help you:
How To Add Days To Date Or Excluding Weekends And Holidays In Excel?
This comment was minimized by the moderator on the site
If I replace 1 (=B2-A2-INT((B2-A2-WEEKDAY(B2)+1)/7) with 2 will it exclude Mondays?
This comment was minimized by the moderator on the site
I have tried, yes.
This comment was minimized by the moderator on the site
No need to use -1 as of my understanding
This comment was minimized by the moderator on the site
Thanks for your remind, I have modified the formula.
This comment was minimized by the moderator on the site
=D5-C5-INT((D5-C5-WEEKDAY(D5)+1)/7) this formula will give more authentic instead of =D5-C5-INT((D5-C5-WEEKDAY(D5)+1)/7)-1.
This comment was minimized by the moderator on the site
Thanks for your remind, I have modified the formula.
This comment was minimized by the moderator on the site
How can i get the SLA results and exclude sunday from the date received and date loaded
This comment was minimized by the moderator on the site
Hi, Lesley, could you explain what SLA means firstly?
This comment was minimized by the moderator on the site
Thank you so much!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations