+ Reply to Thread
Results 1 to 4 of 4

I need Macro for my button to create new line with current date

Hybrid View

  1. #1
    Registered User
    Join Date
    11-03-2014
    Location
    Leeds
    MS-Off Ver
    2010
    Posts
    18

    I need Macro for my button to create new line with current date

    I need to create a macro on my spreadsheet which creates a new line with the current date in the first columb. I can create a macro to do this but i have to select the row I want to put it on. What I need it to do is create a new line with date in first columb under the last inserted colum simply clicking the macro button.

    Any help is greatly appreciated, the macro is for the Aldos Pump Hyd Oil sheet for the moment and attaching it to each other sheet afterwards.

    Also would it be possible to create a macro to insert a new line with date under previous line on more than 1 sheet with 1 button.

    Spreadsheet attached:

    Oil Stock Spreadsheet - Remake in progress.xlsm

  2. #2
    Registered User
    Join Date
    11-03-2014
    Location
    Leeds
    MS-Off Ver
    2010
    Posts
    18

    Re: I need Macro for my button to create new line with current date

    Also if anyone has any suggestions as to any improvements I can make to the spreadsheet as I dont normally work with excel.

    Thanks in advance.

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

    Re: I need Macro for my button to create new line with current date

    It is not entirely clear to me what you want. Maybe this:

    Sub Add_Date()
    
    Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Value = Date
    
    End Sub

  4. #4
    Registered User
    Join Date
    11-03-2014
    Location
    Leeds
    MS-Off Ver
    2010
    Posts
    18

    Re: I need Macro for my button to create new line with current date

    Thats brilliant stnkynts, thanks a lot.

+ 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. Create dynamic line on chart for current date
    By thassim in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 10-10-2014, 07:21 AM
  2. Create line on chart showing current day
    By samalex in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 10-02-2014, 03:05 AM
  3. [SOLVED] Macro button to insert current date
    By Bobp84 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2012, 02:55 PM
  4. Macro button to create new line?
    By Haze1434 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2009, 12:29 PM
  5. create macro to delete row with a date previous to current date
    By laserk7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2008, 12:36 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