+ Reply to Thread
Results 1 to 11 of 11

How to Copy a cell to other column based on the date on the same row?

  1. #1
    Registered User
    Join Date
    08-12-2016
    Location
    Porto,Portugal
    MS-Off Ver
    Excel 2007
    Posts
    5

    How to Copy a cell to other column based on the date on the same row?

    Hi Guys,

    I want to copy the cells in column B from the first worksheet, to the column B from the second worksheet, but i want them to match the date that is on column A. For example, I want to copy the value on column B from the first worksheet that is in the same row as the date 07-08-2016, to the cell in column B from the second worksheet that is in the same row as the date 07-08-2017. I know i can do it manually but I will have to this more than 1000 times, so I would appreciate your help.Can you help me?

    Thanks

    http://www.excelguru.ca/forums/showt...n-the-same-row
    Last edited by nunofrcds; 08-12-2016 at 10:11 AM.

  2. #2
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: How to Copy a cell to other column based on the date on the same row?

    INDEX/MATCH.

    Assuming your dates are in column A for both sheet1 and sheet2 the data you look to move is in sheet1 and you want it in sheet 2, both in column B

    Please Login or Register  to view this content.
    put this into columb B on the destination.

  3. #3
    Registered User
    Join Date
    08-12-2016
    Location
    Porto,Portugal
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to Copy a cell to other column based on the date on the same row?

    But he dates are one year apart, if i limit it to 0 it wont copy right?

    Thanks for reply

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: How to Copy a cell to other column based on the date on the same row?

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.excelguru.ca/forums/showt...n-the-same-row
    Last edited by AliGW; 08-12-2016 at 10:10 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    08-12-2016
    Location
    Porto,Portugal
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to Copy a cell to other column based on the date on the same row?

    Like this?

  6. #6
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: How to Copy a cell to other column based on the date on the same row?

    perhaps you should readup on ondex and match, the 0 isn't a limit in terms of x-number of entries but is rather an option to idicate an exact match, rather than a closer higher or lower match.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: How to Copy a cell to other column based on the date on the same row?

    I have added a link for you above as you have fewer than 5 posts. Please go to the other form and post a link to this thread there, too.

  8. #8
    Registered User
    Join Date
    08-12-2016
    Location
    Porto,Portugal
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to Copy a cell to other column based on the date on the same row?

    Kramxel, i Know that, but the dates aren't the same they are one year apart, so it won't match, and it won't copy, i tried your code and it didnt help me.

    Do you have any other thoughts on that?

    Thanks

  9. #9
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: How to Copy a cell to other column based on the date on the same row?

    sorry missed that part:

    Please Login or Register  to view this content.
    you may need to change the - for a + epending on which way around your looking at it

  10. #10
    Registered User
    Join Date
    08-12-2016
    Location
    Porto,Portugal
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to Copy a cell to other column based on the date on the same row?

    Thanks, this code solves my problem

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: How to Copy a cell to other column based on the date on the same row?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks. You should also make it clear on the other forum where you have posted that your issue is resolved. Please do not ignore this request.

+ 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. VBA Code to select column based on a date then perform copy/paste and shade
    By tompee29 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-17-2014, 06:25 AM
  2. Copy cell value (only) based on date
    By adamdaniel143 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-09-2014, 07:52 PM
  3. Copy column data on one sheet to row or column date on another sheet based on user in
    By soready42012 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2012, 12:03 AM
  4. Copy Cell to next empty cell on other worksheets based on date and category
    By mainebf in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-04-2012, 02:43 PM
  5. Copy cells to new column based on date
    By wotaj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-09-2011, 11:39 AM
  6. Copy row data to ws based on Date in cell
    By Code Flunkie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-14-2009, 09:47 AM
  7. Copy Color Formats Based On Column Date Values
    By Naji in forum Excel General
    Replies: 0
    Last Post: 01-11-2006, 05:10 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