+ Reply to Thread
Results 1 to 4 of 4

Copy paste + Remove

  1. #1
    Registered User
    Join Date
    08-20-2015
    Location
    Bedford
    MS-Off Ver
    2010
    Posts
    12

    Copy paste + Remove

    Hi guys,

    So I'm having an issue working out how to use VBA to copy, paste and clear cells in the same module. What I have currently is a button that will copy cells b10:k10 from Sheet 1 to Sheet 2.

    What I need it to do is when pressed copy B10:K10 from sheet 1 to sheet 2, then copy b2:k2 on sheet 2 to sheet 3 and remove b3:k7 on sheet 2.

    I have been able to make it copy from sheet 2 to sheet 3, but it then will not clear sheet 2 using .clearcontents so I'm unsure what I'm missing.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copy paste + Remove

    Please show all your code here, or attach your file. It is impossible to answer this question without seeing your code.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-20-2015
    Location
    Bedford
    MS-Off Ver
    2010
    Posts
    12

    Re: Copy paste + Remove

    Sorry, code may be convoluted, but currently I have the below. If anyone has suggestions to shorten it then I'm open to that as well.
    Please Login or Register  to view this content.
    What is remaining is to get it to clear "Daily Totals" Range B3:K7 after procedure 12 has completed.
    Last edited by Flammabubble; 08-24-2015 at 10:35 AM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copy paste + Remove

    Based strictly on your description the code you want is
    Please Login or Register  to view this content.
    I have also rewritten your code to be a bit more streamlined. I gave it only a cursory test because I do not have your file.

    Your description says, "copy B10:K10 from sheet 1 to sheet 2" but that is not what your code does. Your code copies B10 and K10, but not the entire range B10:K10.

    Also, some items are copied from row 10, others from row 16. I assume you did that on purpose, but maybe not.


    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. Copy Rows - Paste and remove blanks
    By tigerdel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-24-2012, 01:28 PM
  2. MACRO to remove/copy/paste
    By Nightwolf101 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2012, 10:55 AM
  3. VBA coding concatenate, copy, paste, remove...
    By sk8shorty01 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-29-2011, 01:51 PM
  4. Force Macro to remove cut, copy and paste options
    By Tictac in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-25-2010, 01:38 PM
  5. Copy/Paste Remove Duplicates
    By Rage in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-19-2009, 07:38 AM
  6. Remove the Copy/Paste flashing border
    By Phil_V in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2009, 10:28 AM
  7. copy/paste column remove formulas
    By sugargenius in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2006, 06:55 PM

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