Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping at Blank Lines
I am trying to write a macro that will loop at blank lines. My issue i
I am dealing with 100+ addresses that may have 3-6 rows. I want t transpose them so it is all on one row. I have been using this when I know the number of rows. Unfortunately i does not help when there are variable row numbers in the same sheet But all the Addresses are seperated by blank lines... any help i appreciated. Sub Transpose1() Dim d As Integer Dim c As Integer c = 1 d = 6 FinalRow = Range("A9999").End(xlUp).Row For i = 1 To FinalRow ' Copy data columns, transpose and paste Range("A" & c & ":A" & d).Copy Range("B" & i & ":Z" & i).PasteSpecial Paste:=xlPasteAll Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True d = d + 6 c = c + 6 Next i Columns("A:A").Select Selection.Delete Shift:=xlToLeft Cells.Select Cells.EntireColumn.AutoFit ActiveWorkbook.Save End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro not recognizing blank lines as blank | Excel Discussion (Misc queries) | |||
Delete Blank Lines | Excel Discussion (Misc queries) | |||
Looping Macro That adds a blank row between different part #'s | Excel Discussion (Misc queries) | |||
Blank lines | Excel Programming | |||
how to automatically insert blank lines in between non-blank lines | Excel Programming |