A
ali
Hi gurus,
Could someone help sort this out. I am using the following code to
transpose rows into columns, skipping blanks. (thanks to gary) Can I
add something to it to skip zeroes as well. I want the code to
transpose all non-zero values but leave no gaps in column.
For example: 123404
would be 12344
Public Sub wede()
Dim lastcol As Long
Dim ws As Worksheet
Set ws = Worksheets("SHEET1")
lastcol = ws.Cells(17, Columns.Count).End(xlToLeft).Column
With ws
..Range(.Cells(17, 1), .Cells(17,
lastcol)).SpecialCells(xlCellTypeConstants).Copy
..Range("A150").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, _
SkipBlanks:=False,Transpose:=True
End With
Application.CutCopyMode = False
End Sub
Could somebody help please.
Could someone help sort this out. I am using the following code to
transpose rows into columns, skipping blanks. (thanks to gary) Can I
add something to it to skip zeroes as well. I want the code to
transpose all non-zero values but leave no gaps in column.
For example: 123404
would be 12344
Public Sub wede()
Dim lastcol As Long
Dim ws As Worksheet
Set ws = Worksheets("SHEET1")
lastcol = ws.Cells(17, Columns.Count).End(xlToLeft).Column
With ws
..Range(.Cells(17, 1), .Cells(17,
lastcol)).SpecialCells(xlCellTypeConstants).Copy
..Range("A150").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, _
SkipBlanks:=False,Transpose:=True
End With
Application.CutCopyMode = False
End Sub
Could somebody help please.