跳到主要內容

如何取消合併單元格並在Excel中填充重複值?

如果您有一個包含大量合併單元格的工作表,現在您需要取消合併它們並自動填寫合併單元格中的原始值,如下面的屏幕截圖所示。 您如何快速處理此任務?

使用“轉到特殊位置”命令取消合併單元格並填充重複數據

取消合併單元格並使用VBA代碼填充重複數據

一鍵解除單元格並填充重複數據


箭頭藍色右氣泡 使用“轉到特殊位置”命令取消合併單元格並填充重複數據

隨著 去特別 命令,您可以取消合併單元格並填寫值。 但是此方法有些麻煩,請按照以下步驟操作:

1。 選擇已合併單元格的列。

2。 點擊 首頁 > 合併與中心 > 解除單元格。 看截圖:

3。 並且合併的單元格已被取消合併,只有第一個單元格將被原始值填充。 然後再次選擇範圍。

4。 然後點擊 首頁 > 查找和選擇 > 去特別。 在 去特別 對話框中選擇 空白 選項。 看截圖:

5。 然後點擊 OK,範圍內的所有空白單元格均已選中。 然後輸入 = 並按下 Up 鍵盤上的箭頭鍵。 看截圖:

6。 然後按 Ctrl + Enter 鍵,所有空白單元格均已填充原始合併數據。 看截圖:


箭頭藍色右氣泡 取消合併單元格並使用VBA代碼填充重複數據

使用以下VBA代碼,您可以快速取消合併單元格並填寫值。

1。 按住 ALT + F11 鍵,然後打開 Microsoft Visual Basic for Applications 窗口。

2。 點擊 插入 > 模塊,然後將以下宏粘貼到 模塊窗口。

Sub UnMergeSameCell()'Upadateby Extendoffice
昏暗範圍作為範圍,xCell範圍作為範圍xTitleId =“ KutoolsforExcel”設置WorkRng = Application.Selection設置WorkRng = Application.InputBox(“ Range”,xTitleId,WorkRng.Address,類型:= 8)Application.ScreenUpdating =虛假Application.DisplayAlerts =如果Rng.MergeCells然後帶有Rng.MergeArea .UnMerge .Formula = Rng.Formula以End結尾如果下一個Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub,則對每個Rng為False

3。 然後按 F5 鍵以運行此代碼,將顯示一個對話框,用於選擇要使用的範圍,請參見屏幕截圖:

4. 點擊 OK,則合併後的單元格將被取消合併,並自動向下填充原始合併後的值。


箭頭藍色右氣泡 一鍵解除單元格並填充重複數據

隨著 解除單元格 的效用 Excel的Kutools,您只需單擊一下即可取消合併單元格並填充重複數據,這種方法非常簡單方便。

Excel的Kutools : 帶有300多個便捷的Excel加載項,可以在30天內免費試用

安裝後 Excel的Kutools,您可以執行以下操作:

1。 選擇要合併的列並填寫數據。

2。 點擊 庫工具 > 合併與拆分 > 取消單元格和填充值,請參見屏幕截圖:

3。 並且合併的單元格已被合併並立即用重複的值填充。 查看屏幕截圖:


箭頭藍色右氣泡 使用Kutools for Excel取消單元格並填充重複數據

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!

相關文章:

在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 (49)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks, It really made life easier
This comment was minimized by the moderator on the site
This doesn't solve the problem with sheet that has some blank cells natively
When you find blank cells and fill with value of the cell above, you accidentally fill all the native-blank cells with unwanted values
This comment was minimized by the moderator on the site
Hello, David,
Thanks for your comment.
Yes, if you use the first method, this problem will occur, but if you want to keep the original blank cells, you'd better to use the second or third method in our article.

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Actually there's an easy way to fix this. After step 1, find-replace blank cells with a space.
Then after step 6, find-replace cells with a space with blanks.
Could you consider adding those steps to this tutorial?
This comment was minimized by the moderator on the site
Exatamente o que queria!

Muito obrigada!
This comment was minimized by the moderator on the site
LIFE SAVER! LOVE YOU
This comment was minimized by the moderator on the site
Thanks a lot!! the best solutions
This comment was minimized by the moderator on the site
We can do this using the Broffice Sheets, you must just unmerge it and the data will automatically be repeated in the cells, since they exists before.
This comment was minimized by the moderator on the site
This is amazing. Thank you!
This comment was minimized by the moderator on the site
Thanks... loved it
This comment was minimized by the moderator on the site
The VBA code stalls when an entire columns are selected. There should be a mechanism defending against fruitless running through large loops. Apart from that it works fine.
This comment was minimized by the moderator on the site
thanks very much Saved me lot of time
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