SHARE
TWEET

Untitled

a guest Jun 17th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub UnMergeFill(ByVal ws As Worksheet)
  2.  
  3. Dim cell As Range, joinedCells As Range
  4.  
  5. For Each cell In ws.UsedRange
  6.     If cell.MergeCells Then
  7.         Set joinedCells = cell.MergeArea
  8.         cell.MergeCells = False
  9.         joinedCells.Value = cell.Value
  10.     End If
  11. Next
  12.  
  13. End Sub
  14.  
  15. sub UnMergeFillAllSheets()
  16.     Dim ws As Worksheet
  17.     for Each ws In Worksheets
  18.          UnMergeFill ws
  19.     Next
  20. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top