+ Reply to Thread
Results 1 to 7 of 7

Copying row to the last empty row and add a new date based on cell value

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Copying row to the last empty row and add a new date based on cell value

    Hello

    I am trying to create a preventive maintanance calendar and I'd like to add activities to a list and set the first inital date in one cell.
    When the user has performed the activity they write which date is was performed on and a the row is copied to the last empty row in the list.
    A new date is written based on the "Days to next activity"-value.

    I have attaced a excel file with the basic idea.
    Can anyone help me with the macro code since I am really poor on this.

    /Anders
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: Copying row to the last empty row and add a new date based on cell value

    Have a try with my macro to be pasted in the sheet's module since it uses the event Worksheet_Change to trigger when you input a date in column E:
    Please Login or Register  to view this content.
    Last edited by rollis13; 03-19-2022 at 06:33 PM.

  3. #3
    Registered User
    Join Date
    03-19-2022
    Location
    TBD
    MS-Off Ver
    O365
    Posts
    46

    Re: Copying row to the last empty row and add a new date based on cell value

    Hi a94andwi,

    Please try this code. You can press Alt+F11 to open the macro editor then paste this code in Sheet1 (Blad1):

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Re: Copying row to the last empty row and add a new date based on cell value

    this code works fine. But I want the result of the calculation to be hard coded in the last row. Not the formula itself. How do I alter this? And formated in date format as well..
    /Anders

  5. #5
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: Copying row to the last empty row and add a new date based on cell value

    So, what's wrong with my macro in post #2 ?

  6. #6
    Forum Contributor
    Join Date
    03-14-2005
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    329

    Re: Copying row to the last empty row and add a new date based on cell value

    Nothing. I was lazy and tried the last of two excellent solutions. But yours was actually better!!!
    Big thanks!!

  7. #7
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: Copying row to the last empty row and add a new date based on cell value

    Oh, okay, there were only two, one was mine. In the meantime did some improvements:
    Please Login or Register  to view this content.
    Last edited by rollis13; 03-23-2022 at 10:53 AM.

+ 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 copying and pasting date always on Next empty columns
    By Palucci in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2021, 03:56 PM
  2. [SOLVED] Paste formula to the last empty cell based on a non-empty cell on another column
    By bhenlee in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-02-2015, 04:07 PM
  3. Copying cell information based on date
    By Ashby1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-30-2014, 02:33 PM
  4. [SOLVED] Copying cell data from one sheet to another based on date.
    By Skeeterj in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-07-2014, 04:17 PM
  5. Macro for copying rows based on empty cell
    By rajkumarmp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2013, 10:04 AM
  6. 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
  7. Sum based on date cell not being empty
    By impy in forum Excel General
    Replies: 7
    Last Post: 08-28-2009, 03:34 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