+ Reply to Thread
Results 1 to 8 of 8

Copy and paste based on date and next empty row.

  1. #1
    Registered User
    Join Date
    02-19-2017
    Location
    Helsinki, Finland
    MS-Off Ver
    MS Office 365
    Posts
    60

    Copy and paste based on date and next empty row.

    Hello,
    Help me, if you have time. I have source sheet “Yearly Sales”, and destination sheet ”P01” at same workbook. I have a big problem with my VBA code. I posted 2 screenshots and an excel file. When I use code then I get result same as screenshot 1st one (“P01”). But I want result same as screenshot 2nd one (“Sheet1”). How could I get it? Can any person help me?
    Advance filter does not work here. Because, source sheet’s row does not paste to destination’s sheet directly. Look at this, source sheet’s column “G” paste to destination sheet’s column “N”, source sheet’s column “I” paste to destination sheet’s column “O”, source sheet’s column “H” no need to copy, source sheet’s column “K” paste to destination sheet’s column “P”, here source sheet’s column “J” no need to copy etc., Source sheet “Yearly Sales” will be update every day from others source book, and same time destination sheet “P01” will be update every day. When I update destination sheet “P01” then “P01” update same as screenshot 1st one ( which I posted), but I want update’s result same as screenshot 2nd one ( which I posted). It will be happen to:
    1st March 2021, I will update “P01”, get sales data Row 14 from source,
    2nd March 2021, I will update “P01”, get sales data Row 15 from source,
    3rd March 2021, I will update “P01”, that day is holiday, and I write manually “holiday” Row 16,
    4th March 2021, I will update “P01”, get sales data Row 17 from source, (here all time data will paste to next empty Row).
    5th March 2021 I will update “P01”, get sales data Row 18 from source,
    6th March 2021, I will update “P01”, get sales data Row 19 from source,
    7th March 2021, I will update “P01” manually “No sales” to write Row 20, because that day product “Rice” was not sold.
    8th March 2021, same as 7th March, to write Row 21,
    9th March 2021, I will update “P01”, get sales data Row 22 from source,
    10th March 2021, I will update “P01”, that day is holiday, and I write manually “holiday” Row 23.
    So, this way to continue the rest of days of the month.
    How it is possible to make it or what is the write code for it? Please, see the “621 current send.xlsm” file. There is VBA code Sheet1 “P01”. Help me, please. Thanks.
    Here is Code:
    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy and paste based on date and next empty row.

    3rd March 2021, I will update “P01”, that day is holiday, and I write manually “holiday” Row 16,
    The word holiday does not show up anywhere in column G.

  3. #3
    Registered User
    Join Date
    02-19-2017
    Location
    Helsinki, Finland
    MS-Off Ver
    MS Office 365
    Posts
    60

    Re: Copy and paste based on date and next empty row.

    Yes, source sheet "Yearly Sales" column "G" there is no word "Holiday". But I want 3rd March sheet "P01" row 16 write manually, after that next day Row 17 will be updated
    by clicking "Daily Sales Update" at sheet "P01". You can see my "621 Current ReSend.xlsm" file. Thanks.

  4. #4
    Registered User
    Join Date
    02-19-2017
    Location
    Helsinki, Finland
    MS-Off Ver
    MS Office 365
    Posts
    60

    Re: Copy and paste based on date and next empty row.

    I think something is missing here:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-19-2017
    Location
    Helsinki, Finland
    MS-Off Ver
    MS Office 365
    Posts
    60

    Re: Copy and paste based on date and next empty row.

    Can any one help me?

  6. #6
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Copy and paste based on date and next empty row.

    Hi
    Please Login or Register  to view this content.
    Try to change Name to some thing else like NName or Name_.....

  7. #7
    Registered User
    Join Date
    02-19-2017
    Location
    Helsinki, Finland
    MS-Off Ver
    MS Office 365
    Posts
    60

    Re: Copy and paste based on date and next empty row.

    Thanks for your prompt reply. Yes, I made it. Does not help.

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy and paste based on date and next empty row.

    Your sample does not reflect your question.

+ 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 and paste based on Date and next empty row.
    By mazadb in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-27-2021, 08:19 AM
  2. [SOLVED] Copy and paste based on Date.
    By mazadb in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 05-07-2021, 05:46 PM
  3. VBA to copy to new sheet and paste to last empty row based on criteria
    By Makroz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-19-2019, 10:32 AM
  4. copy paste based on a date
    By namluke in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-11-2015, 10:39 AM
  5. [SOLVED] Code to Copy Rows from 3 zones based on min/max value,and paste in next empty Target row
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-08-2014, 02:29 AM
  6. Copy/Paste to Next Empty Row Overwriting Previous Row When Column A Is Empty
    By grantfitz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 04:34 PM
  7. Copy row based on date and then paste into a new worksheet based on section number
    By calmlaunch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2011, 11:40 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