+ Reply to Thread
Results 1 to 7 of 7

Copy data from sheet1 column with dynamic date, and copy data to second sheet column

  1. #1
    Registered User
    Join Date
    05-17-2016
    Location
    Austin, Texas
    MS-Off Ver
    2013
    Posts
    7

    Copy data from sheet1 column with dynamic date, and copy data to second sheet column

    I posted a problem last week, but as most of the time it is, the easiest solution was the best. A button!


    I am creating a button with a VBA macro to pull data from a column of numbers N3:N36 on sheet1(Weekly) with a header specified by the current days week ending date(as weeks ending on Friday) =TODAY()+(5-WEEKDAY(TODAY(),2)) so for this week it shows 5/27/2016 as the header for the column.


    I would like to copy -> paste this data into a correlating column on sheet2 (Calculation) finding the next column with the matching date as the header (I will pre-fill in each column header for all 52 weeks). So for this weeks data it would pull all the numbers in column N3:N36 with the header 5/27/2016 as defined by our date function and input it into the column with the header 5/27/2016 on sheet2(Calculation).


    I need this function so that I can compound the data entered each week to get a month to date and year to date cumulative total. I would like the defining factor to be the date, so that the macro doesn't just insert data into the next empty column and possibly input data more than one time(I'll be using simple autosums every 4-5 weeks to determine monthly totals).


    I can attach a dummy workbook, or work off of one provided by you.


    Thank you for any and all help you can provide. I would love to find a solution to this problem.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Copy data from sheet1 column with dynamic date, and copy data to second sheet column

    A sample workbook would be greatly appreciated. It will serve two purposes: It will help visualize the requirement better and it will encourage people to work on it since they won't have to create the workbook before starting to work on it.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-17-2016
    Location
    Austin, Texas
    MS-Off Ver
    2013
    Posts
    7

    Re: Copy data from sheet1 column with dynamic date, and copy data to second sheet column

    http://imgur.com/a/Xk50I

    I have attached a link to an imgur album with an exact example of what it is im trying to accomplish.

    I would post the workbook, but it has employee names on it. So I would in essence be creating a new workbook when the pictures should suffice for what I'm needing.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Copy data from sheet1 column with dynamic date, and copy data to second sheet column

    Well, I am still not going to set up a workbook to work on this. I suggest you change the employee names in the version you attach.

  5. #5
    Registered User
    Join Date
    05-17-2016
    Location
    Austin, Texas
    MS-Off Ver
    2013
    Posts
    7

    Re: Copy data from sheet1 column with dynamic date, and copy data to second sheet column

    I didn't expect you were going to work on it to begin with by your original statement of "encourage others". But I apologize if my reply about the pictures sounded snarky. Here is a butchered workbook. I am not concerned with any of the formulas working except for the week ending date in N3, so if anything else is messed up by my deleting of info just now I will rework it. How can I attach the workbook?

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Copy data from sheet1 column with dynamic date, and copy data to second sheet column

    Click on Go Advanced. Go to Manage attachments, click on the Browse button and navigate to the file. Click Upload and when it uploads, leave the page and then Submit Reply.

  7. #7
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: Copy data from sheet1 column with dynamic date, and copy data to second sheet column

    post the excel and we can help. should be easier to do ,if you want to copy all the time the same column to a different one.
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

+ 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 sheet 2 data as it is in sheet3 if column "B" matches in sheet1 & Sheet2
    By shloksurya in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2015, 09:35 PM
  2. Macro to copy & paste data into new sheet depending on column header (date)?
    By BobbyH89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2015, 03:44 PM
  3. [SOLVED] copy data from sheet1 to sheet2 based on column (A) sheet1 and column (C) sheet2
    By AWITCHER in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-13-2014, 03:20 PM
  4. Copy certain data from Sheet1 to Sheet 2 based on values in a column on Sheet1
    By theglitch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 01:28 PM
  5. [SOLVED] Copy data from column A and B Sheet1 and paste into Sheet2
    By rabra in forum Excel General
    Replies: 2
    Last Post: 02-03-2013, 11:39 AM
  6. 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
  7. Excel macro to copy data from Sheet1 row into Sheet2 column
    By peleong in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-12-2011, 10:56 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