Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Need a Macro plz !

I have about 5000 rows of data
I must insert nine blank rows between each two rows
this is the easy part till now....
then i want to fill these nine blank rows with series (linear-trend)

the problem that I want to fill each nine blank rows
seprately...because when i fill all the blank rows... they change the
values in the original rows !!!

so plz i want a macro to fill nine blanks rows then the next nine
blanks rows ! and so on ..

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need a Macro plz !

After you have inserted you 9 blank rows, then

Dim rng as Range, ar as Range
set rng = columns(1).SpecialCells(xlblanks)
for each ar in rng.Areas
' now ar should hold a reference to a set of 9 blank cells in column A
' you can use that to do your fill. It will then loop to the next set
of
' 9 blank cells
Next ar

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
I have about 5000 rows of data
I must insert nine blank rows between each two rows
this is the easy part till now....
then i want to fill these nine blank rows with series (linear-trend)

the problem that I want to fill each nine blank rows
seprately...because when i fill all the blank rows... they change the
values in the original rows !!!

so plz i want a macro to fill nine blanks rows then the next nine
blanks rows ! and so on ..



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Need a Macro plz !

sorry i can't get your point ...
here is the macro i use ,,,, plz clarify


Option Explicit
Sub InsertBlankRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
Dim Rng As Range
Dim lastrw As Long
numRows = InputBox("How many Rows")
lastrw = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range(Cells(1, "A"), Cells(lastrw, "A"))
For r = Rng.Rows.Count To 1 Step -1
Rng.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub


thanks for your help

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need a Macro plz !

Option Explicit
Sub InsertBlankRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
Dim Rng As Range
Dim lastrw As Long
Dim Ar as Range
numRows = InputBox("How many Rows")
lastrw = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range(Cells(1, "A"), Cells(lastrw, "A"))
For r = Rng.Rows.Count To 1 Step -1
Rng.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
set rng = columns(1).SpecialCells(xlblanks)
for each ar in rng.Areas
' now ar should hold a reference to a set of 9 blank cells in column A
' you can use that to do your fill. It will then loop to the next set
of
' 9 blank cells
Next ar
Application.ScreenUpdating = True
End Sub

Not much more I can tell you. Just saying serialize doesn't explain what
you are trying to do.

--
Regards,
Tom Ogilvy



wrote in message
oups.com...
sorry i can't get your point ...
here is the macro i use ,,,, plz clarify


Option Explicit
Sub InsertBlankRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
Dim Rng As Range
Dim lastrw As Long
numRows = InputBox("How many Rows")
lastrw = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range(Cells(1, "A"), Cells(lastrw, "A"))
For r = Rng.Rows.Count To 1 Step -1
Rng.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub


thanks for your help



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Need a Macro plz !

well im trying to interpolate values (the nine blank rows) between the
two original rows ....mainly i have X & Y values along with other
values but i need interpolation only for the X & Y .

you can look at this screenprint ... i think it explian

http://img436.imageshack.us/img436/1491/excel1vq.jpg

http://img436.imageshack.us/my.php?image=excel1vq.jpg



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need a Macro plz !

Didn't you already post about this and get a formula solution which you were
happy with. Use that. Just incorporate it in your code.


--
Regards,
Tom Ogilvy

wrote in message
oups.com...
well im trying to interpolate values (the nine blank rows) between the
two original rows ....mainly i have X & Y values along with other
values but i need interpolation only for the X & Y .

you can look at this screenprint ... i think it explian

http://img436.imageshack.us/img436/1491/excel1vq.jpg

http://img436.imageshack.us/my.php?image=excel1vq.jpg



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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 01:15 PM.

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"