跳到主要內容

如何在Excel中交換或逆轉日期和日期?

假設您需要反轉日期範圍內的日期和月份,如下圖所示,如何實現? 本文將向您展示兩種解決此問題的方法。

使用自定義格式交換或逆轉日期和日期
使用Kutools for Excel快速交換或逆轉日期和日期


使用自定義日期格式交換或逆轉日期和月份

您可以自定義日期格式以在Excel中交換或逆轉日期和月份。 請執行以下操作。

1.選擇要交換日期和月份的日期單元格,然後按 按Ctrl + 1 鍵打開 單元格格式 對話框。

2。 在裡面 單元格格式 對話框,請單擊 習俗 ,在 類別 盒子下 聯繫電話 標籤。 如果原始日期格式為 m / d / yyyy, 請輸入 d / m / yyyy類別 框,如果原始日期格式為 d / m / yyyy, 請輸入 m / d / yyyy類別 框,最後單擊 OK 按鈕。 看截圖:

現在,在選定的日期單元格中交換了日期和月份。


使用Kutools for Excel快速交換或逆轉日期和日期

本節將向您推薦 套用日期格式 的效用 Excel的Kutools。 使用此實用程序,您只需單擊幾下即可輕鬆交換日期和日期。

申請前 Excel的Kutools首先下載並安裝.

1.選擇您需要交換日期和月份的日期範圍,然後單擊 庫工具 > 格式 > 套用日期格式。 看截圖:

2。 在裡面 套用日期格式 對話框,請指定諸如 14/3/2001 或其他匹配的日期格式 日期格式 框,然後單擊 OK 按鈕。 看截圖:

然後,您可以看到所選日期的所有日期和月份立即被交換,如下圖所示。

  如果您想免費試用(30天)此實用程序, 請點擊下載,然後按照上述步驟進行操作。


使用Kutools for 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)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
This is magical how this works
This comment was minimized by the moderator on the site
Very helpful Mohammed. Thank you!
Rated 5 out of 5
This comment was minimized by the moderator on the site
Save the file as CSV as it preserves the date as it appears. Open a blank Excel spreadsheet, open the Data tab and click on From Text/CSV (In the Get & Transform Data section). Select the CSV file and click Import. Click on Transform Data (bottom right). Select the column with the incorrect date (i.e. Column8) and click the Split Column button, by Delimiter. It should automatically pick the correct delimiter (in my case the forward slash) but if not you can use the custom option and type it in. Click OK.
The column is now split into three, select the middle column (i.e. Column8.2) and move it in front of the first column (i.e. Column8.1).
Make sure all 3 columns are selected, then click the Transform menu up the top, and in the Text Column section, select Merge Columns. In the Separator box, select Custom and type back in the forward slash (or whatever was separating the dates before), and click OK.
Click the File menu, and select Close & Load.
From there you can copy and paste the dates back into the original file, now the correct way around.
This comment was minimized by the moderator on the site
Very good!
This comment was minimized by the moderator on the site
Is there a way to swap the data and month VALUE? Not just the formatting. When I paste date values from a text file or PDF, Excel auto-interprets the values incorrectly. I.e. 02-03-2019 is imported as 03rd Feb instead of 02nd Mar. Simply changing the formatting does not fix this problem.
This comment was minimized by the moderator on the site
First Select all the dates, and replace all "/" with ".". Then use below formula:=+REPLACE(A2,1,5,TRIM(MID(LEFT(A2,5),SEARCH(".",LEFT(A2,5))+1,250))&"."&LEFT(LEFT(A2,5),SEARCH(".",LEFT(A2,5))-1))
This comment was minimized by the moderator on the site
So helpful. Thank you my friend it's worked
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations