Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ali ali is offline
external usenet poster
 
Posts: 22
Default find first empty cell in column and start transpose next row in that cell

Hi guys,

I have the following code to transpose one row into column without
blanks and zero's.

Dim lastcol As Long
Dim ws As Worksheet
Set ws = Worksheets("sheet10")
lastcol = ws.Cells(17, Columns.Count).End(xlToLeft).Column
With ws
..Range(Cells(17, 1), Cells(17, lastcol)).Replace 0, ""
..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


I want to be able to transpose many rows into the same column and in
that column I want no empty cells.

row1: 1 2 blank 0 3
row2: 22 33 0 44

after transpose it will look as following:

1

2

3

22

33

44

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default find first empty cell in column and start transpose next row in th

There are two articles available in VBA help that you should probably read.
One is "Using ActiveX Controls in Documents" and the other is "Using ActiveX
Controls in Sheets". To access these articles, open VBA help and type "Using
ActiveX Controls" in the search box. Afer you have read the articales, maybe
you can be more specific about what you want to do.

"ali" wrote:

Hi guys,

I have the following code to transpose one row into column without
blanks and zero's.

Dim lastcol As Long
Dim ws As Worksheet
Set ws = Worksheets("sheet10")
lastcol = ws.Cells(17, Columns.Count).End(xlToLeft).Column
With ws
..Range(Cells(17, 1), Cells(17, lastcol)).Replace 0, ""
..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


I want to be able to transpose many rows into the same column and in
that column I want no empty cells.

row1: 1 2 blank 0 3
row2: 22 33 0 44

after transpose it will look as following:

1

2

3

22

33

44


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default find first empty cell in column and start transpose next row in th

Sorry about that Ali, wrong thread.

"ali" wrote:

Hi guys,

I have the following code to transpose one row into column without
blanks and zero's.

Dim lastcol As Long
Dim ws As Worksheet
Set ws = Worksheets("sheet10")
lastcol = ws.Cells(17, Columns.Count).End(xlToLeft).Column
With ws
..Range(Cells(17, 1), Cells(17, lastcol)).Replace 0, ""
..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


I want to be able to transpose many rows into the same column and in
that column I want no empty cells.

row1: 1 2 blank 0 3
row2: 22 33 0 44

after transpose it will look as following:

1

2

3

22

33

44


Reply
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
Find first empty cell in column TomHull Excel Discussion (Misc queries) 1 November 9th 09 05:16 AM
Find first empty cell in column TomHull Excel Discussion (Misc queries) 2 November 9th 09 01:37 AM
How to: Find first empty cell in column DW Excel Worksheet Functions 18 October 12th 07 05:57 AM
find first empty cell in column and start transpose next row in that cell ali Excel Discussion (Misc queries) 6 July 21st 07 11:55 PM
Find First empty cell at end of Column A DG Excel Programming 7 December 19th 06 06:20 PM


All times are GMT +1. The time now is 04:22 PM.

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

About Us

"It's about Microsoft Excel"