+ Reply to Thread
Results 1 to 14 of 14

Transfer cell data based on date

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    North Carolina
    MS-Off Ver
    Excel 2013
    Posts
    24

    Transfer cell data based on date

    I am looking to transfer data from one cell to another based on dates. For example, on worksheet 1 having a cell (let's say cell B2) that has today's date (=today function). If today's date equals a date on worksheet 2 (cell D2) then transfer the data from worksheet 1 cell B3 to worksheet 2 cell D3. Worksheet 2 will have all the work days in the month and when the date on worksheet 1 matches a date on worksheet 2, the data is transferred to worksheet 2. Worksheet 1 is just an entry point for employees. Worksheet 2 contains all the data which I will manipulate into percentages. Any ideas?
    Thanks!

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Transfer cell data based on date

    Based upon the information you provided.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    North Carolina
    MS-Off Ver
    Excel 2013
    Posts
    24

    Re: Transfer cell data based on date

    Thank you for your reply. I was not able to make that code work but have attached a sample of what I am trying to do. on worksheet 1 in B3 is the daily input. I am trying to get the value in B3 to be input in the cell underneath the corresponding date on worksheet 2. pace modified.xlsm

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Transfer cell data based on date

    It didn't work because you didn't supply accurate information. I followed what you stated in your first post exactly.

    Here is the amended code based upon the example worksheet supplied in your most recent post.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-09-2014
    Location
    North Carolina
    MS-Off Ver
    Excel 2013
    Posts
    24

    Re: Transfer cell data based on date

    That works wonderfully! And you are correct, I did change the worksheet uploaded from what I initially stated. But, and this is on me, I cannot get the code to run automatically. I'm not versed enough in code to get it to run without me using the run command every time a number is entered. Can you assist with this?
    Thank You!

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Transfer cell data based on date

    How would you like the code to be triggered automatically? When you open the workbook, when you change sheets, when you enter data in a cell, etc? Please specify.

  7. #7
    Registered User
    Join Date
    03-09-2014
    Location
    North Carolina
    MS-Off Ver
    Excel 2013
    Posts
    24

    Re: Transfer cell data based on date

    I was thinking that when the value is entered it would automatically show in the second page of the workbook. So when the value is entered. Thanks!

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Transfer cell data based on date

    For this you will need a sheet change event and to do this, right click on Sheet1 Tab --> View Code and then paste the below code on the code window.
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Transfer cell data based on date

    Moreover if you are likely to input the values in B3 of sheet1 only, you may try something like this.....
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    03-09-2014
    Location
    North Carolina
    MS-Off Ver
    Excel 2013
    Posts
    24

    Re: Transfer cell data based on date

    Wow, thank you both so much for this. That works as intended. Last question. I am looking to have this same function for 4 input rows (see attached worksheet). I can't seem to modify the code you posted to get it to do that. I am more of a math user with excel and not so much a code person. Any help is greatly appreciated!pace modified 1.xlsm

  11. #11
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Transfer cell data based on date

    Please Login or Register  to view this content.

  12. #12
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Transfer cell data based on date

    stnkynts has already responded to your request.
    Here is the workbook with the code.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    03-09-2014
    Location
    North Carolina
    MS-Off Ver
    Excel 2013
    Posts
    24

    Re: Transfer cell data based on date

    Thank you gentlemen, I must be doing something wrong as I cannot get the code to work at all.

  14. #14
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Transfer cell data based on date

    I must be doing something wrong as I cannot get the code to work at all.
    Did you enable macros? Using the example sheet sktneer provided type a value into cell B3 on sheet1. It will put it into the corresponding cell on sheet2.

+ 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. Transfer cell information to another sheet, based on the date
    By twisted31 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-09-2013, 07:05 PM
  2. Replies: 0
    Last Post: 07-11-2012, 07:19 PM
  3. Replies: 10
    Last Post: 12-25-2009, 08:10 AM
  4. Transfer Data to separate tables based two variables (date and site)
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2009, 08:30 PM
  5. Use button on sheet to transfer data based on todays date
    By Qaspec in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2005, 01:37 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