Need a Macro plz !


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 10 of 10

Thread: Need a Macro plz !

Threaded View

  1. #1
    Join Date
    Oct 2005
    Posts
    5

    Exclamation 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 !!!

    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 .

    this is the code i used to insert the blank 9 rows...i wish any one can complete it concerning teh filling values issue

    Code:
    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
    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
    Last edited by geophysicist; 10-19-2005 at 04:48 PM. Reason: forgot something !

Similar Threads

  1. word macro problem : No reply
    By namella in forum Mobile
    Replies: 0
    Last Post: 08-25-2005, 07:27 AM
  2. plz plz plz help me(java)
    By kamon in forum Java
    Replies: 4
    Last Post: 08-10-2005, 10:30 AM
  3. ANN: VB.IDE Macro Studio
    By Leigh in forum vb.announcements
    Replies: 0
    Last Post: 09-10-2001, 07:12 AM
  4. Run Access Macro
    By Bob in forum VB Classic
    Replies: 2
    Last Post: 07-30-2001, 12:48 PM
  5. VB.IDE Macro Studio version 1.1 now available.
    By Leigh Pointer in forum vb.announcements
    Replies: 0
    Last Post: 03-13-2000, 04:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center