跳到主要內容

如何在Excel中計算/計算兩個日期之間的季度? 

通常,在工作表中,通常需要計算兩個給定日期之間的年,月或日,但是,您是否曾經嘗試過在Excel中計算兩個日期之間的四分之一?

用公式計算/計算兩個日期之間的季度


箭頭藍色右氣泡 用公式計算/計算兩個日期之間的季度

要獲取兩個給定日期之間的季度數,請使用以下公式,請這樣做:

計算兩個給定日期之間的季度數:

請輸入以下公式: =FLOOR(((YEAR(B2)*12+MONTH(B2))-(YEAR(A2)*12+MONTH(A2)))/3,1) 放入要放入計算結果的空白單元格,然後按 Enter 鍵,請參見屏幕截圖:

doc計算季度1

備註:在以上公式中, A2 是開始日期,並且 B2 是結束日期單元格,您可以根據需要進行更改。


計算從給定日期到今天的季度數:

這也是一個公式,可以幫助您計算從給定日期到當前日期的季度數,請輸入: = FLOOR((((YEAR(NOW())-YEAR(A2))* 12 + MONTH(NOW())-MONTH(A2))/ 3,1) 放入要返回結果的空白單元格,然後按 Enter 鍵,並且一次計算了給定日期和今天之間的季度數,請參見屏幕截圖:

doc計算季度2

備註:在上式中 A2 是您要使用的給定日期,您可以根據需要進行更改。


相關文章:

如何在Excel中從租用日期算起服務期限?

如何在Excel中從出生日期算起退休日期?

如何在Excel中計算兩個日期之間的天數小時和分鐘?

最佳辦公生產力工具

🤖 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 (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I need a formula that returns the # of complete standard yearly quarters between two dates (i.e. Jan-Mar, Apr-Jun, Jul-Sep, Oct-Dec), not just 'numerical' quarters, which this oft-repeated formula gives. In my example, Jan to Aug should give one standard quarter (Apr-Jun in the same year) but your formula gives (8-1)/3 = 2.66... FLOORed to 2, which is wrong in my context. I can't find this anywhere, and ChatGPT is useless as well.
This comment was minimized by the moderator on the site
Any updates? having similar issues - it just does month + 3
This comment was minimized by the moderator on the site
Calculate the number of quarters between two given dates:
Your example is almost 12 weeks wrong!

Feb 1, 2015 - Jan 30, 2016 is 1 day shy of 4Qs.
Your answer is 3Qs
This comment was minimized by the moderator on the site
Hello, Roger Brownlie

In this case, you should apply this formula: =ROUND(DATEDIF(A2,B2,"M")/3,0)

Please havea try, thank you!
This comment was minimized by the moderator on the site
Ik wil een automatische berekening van de geldigheid van overuren.
Concreet betekent dit dat ik in excel de datum van de overuren moet omzetten in het kwartaal waarin ze vallen, en vandaaruit drie kwartalen verder reken tot de uiterste datum wanneer de overuren geldig zijn.
Kan iemand me hiermee helpen?
This comment was minimized by the moderator on the site
how to display a quarter against a date....eg i get a date from banks, and from that date i build a formula to check which quarter it falls in...what would be the formula
This comment was minimized by the moderator on the site
Thank You!!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations