LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ali ali is offline
external usenet poster
 
Posts: 22
Default TRANSPOSE WITHOUT ZEROES(0's)

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.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
disregarding zeroes Sapper Excel Discussion (Misc queries) 4 April 27th 09 02:28 PM
Can I set the default for "show zeroes" to not show the zeroes? jeel Setting up and Configuration of Excel 1 January 25th 08 07:18 PM
Leading Zeroes Melissa Excel Discussion (Misc queries) 3 October 11th 06 07:38 PM
F5 function for zeroes? Lee Harris Excel Worksheet Functions 3 November 22nd 05 10:24 PM
I WANT TO TRANSPOSE LINKS, AS WE TRANSPOSE VALUES Umair Aslam Excel Worksheet Functions 1 September 22nd 05 01:19 PM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"