+ Reply to Thread
Results 1 to 7 of 7

Macro for copying and pasting cells with data

  1. #1
    Registered User
    Join Date
    01-06-2013
    Location
    uae
    MS-Off Ver
    Excel 2010
    Posts
    12

    Macro for copying and pasting cells with data

    Hi,

    This is part of my macro

    Please Login or Register  to view this content.
    I want to change 2nd row

    Please Login or Register  to view this content.

    So that it copies all the columns from A to F , till the last row which has data in it.(The last row with data in all the columns will be the same)

    Also I want to change

    Please Login or Register  to view this content.
    So that Columns A to F are pasted to the first empty row in all columns from A to F.(The first empty row in all the columns will be the same)

    PLEASE HELP.

    Thanks

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Macro for copying and pasting cells with data

    Try:
    Please Login or Register  to view this content.
    Last edited by Mumps1; 12-15-2014 at 09:51 AM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    01-06-2013
    Location
    uae
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Macro for copying and pasting cells with data

    hI,

    I tried what you said. It says subscript out of range. I dont know why. Also I dont know much about writing macros. I just record and copy paste.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Macro for copying and pasting cells with data

    Are "Sec 2.xlsx" and "New.xlsm" names of files or names of worksheets? If they are file names, what are the names of the source and destination worksheets?

  5. #5
    Registered User
    Join Date
    01-06-2013
    Location
    uae
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Macro for copying and pasting cells with data

    HTML Code: 
    Both of these are names of different WORKBOOKS. I am using sheet one of both these workbooks. Sec 2 sheet 1 is the source and New. sheet 1 is the destination

  6. #6
    Registered User
    Join Date
    01-06-2013
    Location
    uae
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Macro for copying and pasting cells with data

    As i told you i know nothing about writing macros.Isnt there a simple way for

    Please Login or Register  to view this content.
    to select the entire first empty row from A TO J instead of just selecting first empty cell in A.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Macro for copying and pasting cells with data

    Make sure that both workbooks are open and then try:
    Please Login or Register  to view this content.

+ 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. Ignore blank cells while copying and pasting macro
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2011, 04:13 AM
  2. Searching cells then copying/pasting and deleting macro
    By JayWeb in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-27-2009, 05:40 AM
  3. Is there a macro for copying and pasting data..
    By Tibby in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2008, 09:40 AM
  4. Replies: 1
    Last Post: 08-15-2007, 05:04 PM
  5. Copying + pasting special a dynamic range of cells through a macro
    By kostas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2007, 07:20 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