View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Excel Select All Visible Merged cell then Spread Cell Data

rtwiss,

Dim myS As Worksheet

Cells.ColumnWidth = 11
Cells.RowHeight = 17
Set myS = ActiveSheet

Sheets.Add(Type:="Worksheet").Name = "New Sheet"
myS.Range("A1").CurrentRegion.Copy 'Or other code to pic up all the cells that you want to copy
Sheets("New Sheet").Range("A1").PasteSpecial _
Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True

HTH,
Bernie
MS Excel MVP


"rtwiss via OfficeKB.com" <u46610@uwe wrote in message news:8b4fb7b2b5ce0@uwe...
How wood i then make all cell universal shape, make a new sheet, and special
paste transposed on the new sheet?

Bernie Deitrick wrote:
rtwiss,

Try the macro below.

HTH,
Bernie
MS Excel MVP

Sub UnMergeAllCells()

Dim myC As Range
Dim myR As Range
Dim myV As Variant
Dim myM As Range

For Each myC In ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisib le)
If myC.MergeCells Then
Set myM = myC.MergeArea
myV = myC.Value
myC.UnMerge

For Each myR In myM
myR.Value = myV
Next myR
End If
Next myC
End Sub

Can anyone help me with this. I have two parts of the program. Here they
a

[quoted text clipped - 26 lines]

End Sub


--
Message posted via http://www.officekb.com