Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have one excel spread sheet like this on ColumnA like this
000 001 002 003 004 005 .. .. .. all the way done real long Column A I would like to break down every 16 rows, so the A1 will show000 A16 will show 001 A32 will show 002 A48 will show.003 so on and so for, until to the end of row Thanks. Lillian |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lillian:
try it, r = Range("A65536").End(xlUp).Row For i = r To 2 Step -1 Rows(i & ":" & i + 15).Insert Shift:=xlDown Next -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Lillian" wrote: I have one excel spread sheet like this on ColumnA like this 000 001 002 003 004 005 . . . all the way done real long Column A I would like to break down every 16 rows, so the A1 will show000 A16 will show 001 A32 will show 002 A48 will show.003 so on and so for, until to the end of row Thanks. Lillian |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
SAVE your data first then try:
Sub mvdata() Dim theData As Variant Dim i As Long theData = Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row) If UBound(theData) < 4098 Then Columns(1).ClearContents Columns(1).NumberFormat = "@" Range("A1").Value = theData(1, 1) For i = 2 To UBound(theData) Cells((i * 16) - 16, 1).Value = theData(i, 1) Next i Else MsgBox "Too much data" End If End Sub Hope this helps Rowan Lillian wrote: I have one excel spread sheet like this on ColumnA like this 000 001 002 003 004 005 . . . all the way done real long Column A I would like to break down every 16 rows, so the A1 will show000 A16 will show 001 A32 will show 002 A48 will show.003 so on and so for, until to the end of row Thanks. Lillian |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It works, thanks
"Lillian" wrote: I have one excel spread sheet like this on ColumnA like this 000 001 002 003 004 005 . . . all the way done real long Column A I would like to break down every 16 rows, so the A1 will show000 A16 will show 001 A32 will show 002 A48 will show.003 so on and so for, until to the end of row Thanks. Lillian |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks It work, what is mean by " r To 2 Step -1" and "Rows(i & ":" & i +
15).Insert Shift:=xlDown" Can you explain to me, I will be really appreciate it. "chijanzen" wrote: Lillian: try it, r = Range("A65536").End(xlUp).Row For i = r To 2 Step -1 Rows(i & ":" & i + 15).Insert Shift:=xlDown Next -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Lillian" wrote: I have one excel spread sheet like this on ColumnA like this 000 001 002 003 004 005 . . . all the way done real long Column A I would like to break down every 16 rows, so the A1 will show000 A16 will show 001 A32 will show 002 A48 will show.003 so on and so for, until to the end of row Thanks. Lillian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I draw chemical structures in Excel spreed sheet? | Charts and Charting in Excel | |||
Interrupting long calculations in Excel? Hi all, I am having a verylong calculation in Excel using VBA. Of course I know I can hit ESC orCTRL+BREAK to interrupt the VBA program. But I found due to too long runningprocess, the Excel window stop to | Excel Discussion (Misc queries) | |||
Formating Excel Spreed Sheet | Excel Discussion (Misc queries) | |||
how to increment no on excel spreed sheet | Excel Programming | |||
How can I read over than 65,536 rows from excel spreed sheet | Excel Discussion (Misc queries) |