+ Reply to Thread
Results 1 to 4 of 4

Copy row from sheet 1 to 2 and move sheet 2 down 1 row.

  1. #1
    Registered User
    Join Date
    10-10-2015
    Location
    Stockholm
    MS-Off Ver
    Windows 7
    Posts
    16

    Copy row from sheet 1 to 2 and move sheet 2 down 1 row.

    Hi!
    Im new to Excel and im working on this "simple" macro.

    I have 2 sheets.

    On Sheet1(LagerXI) i have inserted data between Columns B to H and row 2 to 800. My idea is that I have 800 buttons in column A (row 2 to 800) next to the data.
    When i press a button it should copy that row and insert it in Sheet2(Arbetsmall).
    If i then press another button it chould copy that row in Sheet1 and move it to the top of sheet 2. There by moving all previous data in sheet 2 down one step.


    This is the code ive come up with:
    Please Login or Register  to view this content.
    It works fine but i have like 800 items i need to do a button for. I then have to change Range("B2:H2") by + 1 for the rest of the 800 items.. Is there a code that does that for me?
    Attached Files Attached Files
    Last edited by paz1987; 10-10-2015 at 04:56 AM.

  2. #2
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Copy row from sheet 1 to 2 and move sheet 2 down 1 row.

    hii welcome to forum.... Instead of inserting 800 buttons just select desired row and press Alt+F8 and run following code..


    If this works for you then mark this thread as Soved(see at top right "Thread Tools"

    Also "Add reputation" to answer...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Don`t care, take care...

    Regards,
    Mangesh

  3. #3
    Registered User
    Join Date
    10-10-2015
    Location
    Stockholm
    MS-Off Ver
    Windows 7
    Posts
    16

    Re: Copy row from sheet 1 to 2 and move sheet 2 down 1 row.

    Thanx Mangesh.

    That is much easier. Also if it possible, i want to have a button in sheet2 (Arbetsmall) that copies all the newly inserted data into new outlook mail.

    Thanx in advance.

    This is what i come up with:
    Please Login or Register  to view this content.
    It works but it then takes blank cells into the outlook mail. How do i code so it ignores blank spaces if there are any?
    Last edited by paz1987; 10-10-2015 at 04:19 AM.

  4. #4
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Copy row from sheet 1 to 2 and move sheet 2 down 1 row.

    hey this is another question you please mark this as solved and start new thread with suitable title..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. move sheet from one workbook to another ( copy of sheet)
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2014, 06:07 PM
  2. Move data to new sheet and create copy of template sheet
    By jdm13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2014, 01:53 PM
  3. [SOLVED] Copy row from sheet 1 to next row in sheet 2. delete from sheet 1 and move rows up
    By papabob1954 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2012, 09:38 PM
  4. [SOLVED] Move datasets sheet to sheet based on list in different sheet
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-25-2011, 04:45 AM
  5. Excel 2007 : Sheet/Move or Copy
    By 854800 in forum Excel General
    Replies: 1
    Last Post: 11-21-2009, 07:59 PM
  6. [SOLVED] move or copy sheet
    By Cathy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2006, 01:00 PM
  7. [SOLVED] Copy Sheet and move to end
    By Nigel in forum Excel General
    Replies: 1
    Last Post: 08-09-2005, 01:05 PM
  8. How to copy a sheet and move it to 2nd last (with VBA)
    By Brad K. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2005, 05:06 AM

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