+ Reply to Thread
Results 1 to 5 of 5

Macro to copy/paste IF

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2013
    Posts
    50

    Macro to copy/paste IF

    Hi guys, question pertaining to copying and pasting a row of numbers based on a condition.

    Column A has a group of dates, with row 2 containing today's date and all below are dates ranging from today through 9/31. Basically what I need to do is have a macro paste the values to the right of today's date to the corresponding date below. Hopefully this makes sense and I have attached a sample sheet.
    Attached Files Attached Files

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Macro to copy/paste IF

    See attached, change the date in cell A2 and see if this is what you wanted

    macro-to-copy-paste-if-sample2 Ver2.xlsx
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2013
    Posts
    50

    Re: Macro to copy/paste IF

    Quote Originally Posted by gmr4evr1 View Post
    See attached, change the date in cell A2 and see if this is what you wanted

    Attachment 401022
    That's a start, now I just need to come up with the macro that will paste the values for the date so they are archived.

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Macro to copy/paste IF

    Meaning you need the values to remain in the cells even if you change the date in A2?

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2013
    Posts
    50

    Re: Macro to copy/paste IF

    Quote Originally Posted by gmr4evr1 View Post
    Meaning you need the values to remain in the cells even if you change the date in A2?
    Yes, basically the work you have done so far gets me to being able to copy/paste values for each given day.

    What I would like a macro to do would be to paste the values each day for the current date.

    I'm assuming the macro can be constructed by using some combination of IF A4:A143=A2, paste values of cells B2:AE2 into whichever date falls in A4:A143.

    I'm somewhat familiar with coding but not exactly sure how to translate that.

+ 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 paste - cute paste macro almost working
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2014, 12:33 PM
  2. Copy & paste in macro doesn't paste all cells
    By pltrapper in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2013, 09:22 AM
  3. [SOLVED] Simple copy and paste macro- Paste special help needed.
    By hernancrespo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2012, 07:02 AM
  4. 2 Macro's: only vertical copy/paste action and copy-paste 14 columns to the right.
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2010, 10:34 AM
  5. [SOLVED] Copy and Paste macro needs to paste to a changing cell reference
    By loulou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2005, 07: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