+ Reply to Thread
Results 1 to 3 of 3

Macro: find next free row and copy - help!

  1. #1
    Registered User
    Join Date
    05-06-2005
    Posts
    2

    Macro: find next free row and copy - help!

    I have a spreadsheet containing rows of values but the last row is a row of formulas.
    I am trying to write a macro which finds the last row and then I want to copy the last row (containing formulas which I want to retain) in to the next row (which is empty) and then covert the row that was formulas to values.
    Every time I use the macro I will of course be extended the data range by one.

    Can anyone help please?

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    something like this probably:

    Sub Button1_Click()

    myRow = Worksheets("Sheet1").Range("A65536").End(xlUp).Row
    Range(myRow & ":" & myRow).Copy
    Range(myRow + 1 & ":" & myRow + 1).PasteSpecial
    Range(myRow & ":" & myRow).Clear

    End Sub


    - Mangesh

  3. #3
    Registered User
    Join Date
    05-06-2005
    Posts
    2

    Smile

    Thanks Mangesh
    Seems to have done the trick.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1