跳到主要內容

如何在Excel中從星期數和年份中獲取月份?

如果您在Excel中有兩列,一個包含年份,另一個包含星期,如下所示,如何在下一列中直接從中獲取月份?

doc從星期數中獲取月份 文檔箭頭 doc從星期數中獲取月份

在Excel中從星期數和年份中獲取月份


箭頭藍色右氣泡 在Excel中從星期數和年份中獲取月份

在Excel中,兩個公式都可以從給定的星期數和年份中獲得月份。

點擊您要獲取月份的單元格,然後輸入以下公式=選擇(MONTH(DATE(A2,1,B2 * 7-2)-WEEKDAY(DATE(B2,1,3))),“一月”,“二月”,“三月”,“四月”,“五月”, “ XNUMX月”,“ XNUMX月”,“ XNUMX月”,“ XNUMX月”,“ XNUMX月”,“ XNUMX月”,“ XNUMX月”) 進去,然後按 Enter 鍵以獲取結果,然後拖動自動填充以填充此公式所需的單元格。 現在,您將獲得一個月。

doc從星期數中獲取月份

如果只需要將月份作為阿拉伯數字,則可以使用以下公式 =MONTH(DATE(A2,1,B2*7-2)-WEEKDAY(DATE(B2,1,3))).

doc從星期數中獲取月份

尖端:在以上公式中,A2表示年單元格,B2是周數單元格。


相關文章:

最佳辦公生產力工具

🤖 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 (10)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Hi,

What formula is there to covert weekly (begining of the week) sales data by Sku # in to monthly data by Sku #
This comment was minimized by the moderator on the site
=MONTH(DATE(A2,1,B2*7-2)-WEEKDAY(DATE(A2,1,3))) - small correction - it would be A2 instead of B2 for the 2nd Date function
This comment was minimized by the moderator on the site
=MONTH(DATE(A2,1,B2*7-2)-WEEKDAY(DATE(A2,1,3))) - small correction, it would be A2 and not B2
This comment was minimized by the moderator on the site
1st use:Start Date of the week Monday =MAX(DATE(A2,1,1),DATE(A2,1,1)-WEEKDAY(DATE(A2,1,1),2)+(B2-1)*7+1)
Start Date of the week Sunday =MAX(DATE(A2,1,1),DATE(A2,1,1)-WEEKDAY(DATE(A2,1,1),2)+(B2-1)*7)
2nd use in new column:
Month
=TEXT(C2,"mmm")
This comment was minimized by the moderator on the site
Hi,

Does anyone know how to get WW-YYYY?


Thanks
This comment was minimized by the moderator on the site
=Concatenate(TEXT(DateCell,"YYYY"),"-",TEXT(ISOWEEKNUM(Datecell,"00")))

flop the text for the orientation desired
Rated 5 out of 5
This comment was minimized by the moderator on the site
Hello Wrong result

" =MONTH(DATE(A2,1,B2*7-2)-WEEKDAY(DATE(B2,1,3)))." ????????????????

a2 = 2018 b2=1 month = 12 ??????????
This comment was minimized by the moderator on the site
=MONTH(DATE(A2,1,B2*7-2)-WEEKDAY(DATE(A2,1,3)))
This comment was minimized by the moderator on the site
Works Great!

=MES(FECHA(B3,1,C3*7-2)-DIASEM((FECHA(C3,1,3))))

B3=2015
C3=1
MES=12
This comment was minimized by the moderator on the site
very useful. Thanks!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations