Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Break apart in long excel spreed sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Break apart in long excel spreed sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Break apart in long excel spreed sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Break apart in long excel spreed sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Break apart in long excel spreed sheet

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
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
How do I draw chemical structures in Excel spreed sheet? James Charts and Charting in Excel 1 March 31st 09 08:29 AM
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 LunaMoon Excel Discussion (Misc queries) 3 July 31st 08 04:47 PM
Formating Excel Spreed Sheet xkaylax Excel Discussion (Misc queries) 1 January 31st 08 01:43 AM
how to increment no on excel spreed sheet Lillian Excel Programming 3 October 26th 06 05:32 AM
How can I read over than 65,536 rows from excel spreed sheet Lillian Excel Discussion (Misc queries) 2 April 16th 06 01:47 AM


All times are GMT +1. The time now is 02:47 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"