+ Reply to Thread
Results 1 to 11 of 11

Running Macro to copy Rows of Formulas

  1. #1
    Registered User
    Join Date
    11-11-2007
    Posts
    44

    Running Macro to copy Rows of Formulas

    Hello Everyone,

    Here's what I am doing:

    I have 2 speadsheets, I want to copy rows of Formulas from Spreadsheet 1 and copy them into Spreadsheet 2 but convert them into Values.

    Is it possible to create a button on Spreadsheet 1 and assign macro to do exactly what i want? I also want the macro to look for the first empty row in the database so that the information being copied are on the next row and not overwritten.

    I hope I am making sense.

    Thanks for your help in advance!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if link helps

    http://www.rondebruin.nl/copy1.htm

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    11-11-2007
    Posts
    44
    Quote Originally Posted by VBA Noob
    See if link helps

    http://www.rondebruin.nl/copy1.htm

    VBA Noob
    I am sure the code should work but because I am new to macro's, I might be missing something here.

    Here's what I want to do, I want to copy the information from Row number 1 located in the sheet called IWLog and paste the information in an empty row as Values in the sheet called Log.

    Thank you.

    Here's my code:
    Please Login or Register  to view this content.
    Last edited by cooh23; 11-11-2007 at 05:42 AM.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You need to read this line again

    Important: The macro examples use one function or two functions that you can find in the last section of this page.
    As you forgot to add

    Please Login or Register  to view this content.
    or Instead of a function you can also check one row or column to find the last cell with a value.

    Replace this line:
    Please Login or Register  to view this content.
    With:
    Please Login or Register  to view this content.
    VBA Noob

  5. #5
    Registered User
    Join Date
    11-11-2007
    Posts
    44
    Thank you!
    It worked!

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Your welcome

    VBA Noob

  7. #7
    Registered User
    Join Date
    11-11-2007
    Posts
    44
    Another Question:

    I have gotten the codes to work, but now I want to copy the info from one worksheet to another worksheet.

    The codes below work but it closes the worksheet automatically rather than keeping it open.

    Please Login or Register  to view this content.
    How do I keep test2 to remain open when running the macro?

    Thank you!

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Remove this line

    Please Login or Register  to view this content.
    VBA Noob

  9. #9
    Registered User
    Join Date
    11-11-2007
    Posts
    44
    Quote Originally Posted by VBA Noob
    Remove this line

    Please Login or Register  to view this content.
    VBA Noob
    Removing this code leaves it open but running the macro again does not save the information. It wants to open the file again and discard any changes made.

    The reason I want the test2.xls to remain open because it is going to sit on a server and the file is fairly large. So running the macro that opens it and closes it will be time consuming. But leaving it open and just keeps adding rows and saving it later will save me a lot of time.

    Thank you again..

    I have a feeling that the code needs to be change somewhere here:
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This should save changes

    Please Login or Register  to view this content.
    VBA Noob

  11. #11
    Registered User
    Join Date
    11-11-2007
    Posts
    44
    Quote Originally Posted by VBA Noob
    This should save changes

    Please Login or Register  to view this content.
    VBA Noob
    Wow... Thank you very much!

    This is going to save me a lot of time.

+ 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