Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Developing Macros

Creating a Macro; Simply inserting 4 blank rows between two populated rows.
Here is what I did and it works.

Sub Add4Lines()
Application.ScreenUpdating = False
Do Until ActiveCell.Text = ""
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.Offset(5, 0).Select
Loop
End Sub


Now I need to figure out how to insert blank rows to show in this format
(Column A & B are formated according to above macro. Column C & D is what I
need the new macro for). On Column C, starting at R1 (Row 1), there are two
blank rows before the next populated row at R3. Then two more blank rows and
then R6 is populated with data. Here is where it gets tricky. Between
populated rows R6 & R8, there is a blank row. The format is basically every
2-1/2 rows, there is a populated row. Just scroll down and you will see the
pattern.

Column A Column B Column C
Column D
R1 0.900000036 -4.394664288
R2
R3 1.400000095 25.50197601
R4
R5
R6 1.900000095 -2.563554049 1.900000095 25.50197601
R7
R8 2.400000095 25.52112961
R9
R10
R11 2.900000095 -32.22753525 2.900000095 25.54034042
R12
R13 3.400000095 25.55951309
R14
R15
R16 3.900000095 0.732443988 3.900000095 25.55951309
R17
R18 4.400000095 25.57868385
R18
R20
R21 4.900000095 -2.929775953 4.900000095 25.59783554


If anyone can help me out on this on, it would be greatly appreciated.

Thanks,

Tim Ashcom


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Developing Macros

ry this

Sub Add4Lines()
Application.ScreenUpdating = False
RowCount = 1
Do While Range("A" & RowCount) < ""
Rows(RowCount + 1).Insert
Rows(RowCount + 1).Insert
Rows(RowCount + 4).Insert
RowCount = RowCount + 5
Loop
End Sub

"Tim Ashcom" wrote:

Creating a Macro; Simply inserting 4 blank rows between two populated rows.
Here is what I did and it works.

Sub Add4Lines()
Application.ScreenUpdating = False
Do Until ActiveCell.Text = ""
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.Offset(5, 0).Select
Loop
End Sub


Now I need to figure out how to insert blank rows to show in this format
(Column A & B are formated according to above macro. Column C & D is what I
need the new macro for). On Column C, starting at R1 (Row 1), there are two
blank rows before the next populated row at R3. Then two more blank rows and
then R6 is populated with data. Here is where it gets tricky. Between
populated rows R6 & R8, there is a blank row. The format is basically every
2-1/2 rows, there is a populated row. Just scroll down and you will see the
pattern.

Column A Column B Column C
Column D
R1 0.900000036 -4.394664288
R2
R3 1.400000095 25.50197601
R4
R5
R6 1.900000095 -2.563554049 1.900000095 25.50197601
R7
R8 2.400000095 25.52112961
R9
R10
R11 2.900000095 -32.22753525 2.900000095 25.54034042
R12
R13 3.400000095 25.55951309
R14
R15
R16 3.900000095 0.732443988 3.900000095 25.55951309
R17
R18 4.400000095 25.57868385
R18
R20
R21 4.900000095 -2.929775953 4.900000095 25.59783554


If anyone can help me out on this on, it would be greatly appreciated.

Thanks,

Tim Ashcom


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Developing Macros

Joel,

It worked! Appreciate your help very much since I am a novice when it comes
to developing marcro's.

Thanks again, Tim

"Joel" wrote:

ry this

Sub Add4Lines()
Application.ScreenUpdating = False
RowCount = 1
Do While Range("A" & RowCount) < ""
Rows(RowCount + 1).Insert
Rows(RowCount + 1).Insert
Rows(RowCount + 4).Insert
RowCount = RowCount + 5
Loop
End Sub

"Tim Ashcom" wrote:

Creating a Macro; Simply inserting 4 blank rows between two populated rows.
Here is what I did and it works.

Sub Add4Lines()
Application.ScreenUpdating = False
Do Until ActiveCell.Text = ""
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Insert
ActiveCell.Offset(5, 0).Select
Loop
End Sub


Now I need to figure out how to insert blank rows to show in this format
(Column A & B are formated according to above macro. Column C & D is what I
need the new macro for). On Column C, starting at R1 (Row 1), there are two
blank rows before the next populated row at R3. Then two more blank rows and
then R6 is populated with data. Here is where it gets tricky. Between
populated rows R6 & R8, there is a blank row. The format is basically every
2-1/2 rows, there is a populated row. Just scroll down and you will see the
pattern.

Column A Column B Column C
Column D
R1 0.900000036 -4.394664288
R2
R3 1.400000095 25.50197601
R4
R5
R6 1.900000095 -2.563554049 1.900000095 25.50197601
R7
R8 2.400000095 25.52112961
R9
R10
R11 2.900000095 -32.22753525 2.900000095 25.54034042
R12
R13 3.400000095 25.55951309
R14
R15
R16 3.900000095 0.732443988 3.900000095 25.55951309
R17
R18 4.400000095 25.57868385
R18
R20
R21 4.900000095 -2.929775953 4.900000095 25.59783554


If anyone can help me out on this on, it would be greatly appreciated.

Thanks,

Tim Ashcom


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
Need Help Developing Formula RockyFTI Excel Worksheet Functions 4 June 12th 09 07:24 PM
Developing Macros Ed.Rob Excel Discussion (Misc queries) 1 June 22nd 06 06:51 AM
2 questions about developing. Mike Archer Excel Programming 1 June 13th 06 02:12 PM
Developing Multilingual VBA Apps Blazin J Excel Programming 1 February 17th 05 01:52 PM
developing an app for the Mac on a w2k box with office 2k Kent Eilers Excel Programming 2 February 18th 04 03:56 AM


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