Results 1 to 5 of 5

input date column A, increment B, select blank cell in D and input time. in a macro

Threaded View

jeffstu input date column A,... 09-19-2012, 10:32 AM
jeffstu Re: input date column A,... 09-19-2012, 10:46 AM
tigeravatar Re: input date column A,... 09-19-2012, 10:56 AM
jeffstu Re: input date column A,... 09-19-2012, 11:14 AM
tigeravatar Re: input date column A,... 09-19-2012, 11:19 AM
  1. #1
    Registered User
    Join Date
    09-19-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    input date column A, increment B, select blank cell in D and input time. in a macro

    Hi,

    I've been trying to get a macro triggered by a button to select the next blank cell in column A and enter the current date, Static so it doesn't change when I close the spreadsheet.
    Then Select column B and increment the number from the above cell
    Then Select the next blank cell in column D and enter the current Time.

    So Far I can get it to either enter the date in the next blank column A or enter both in column D in separate cells.

    unless I do the code like this

    Sub Start()
    
    Cells(Rows.Count, "A").End(xlUp).Offset(1).Select
    Application.SendKeys ("^;{TAB}{TAB}{TAB}^+;")
    Application.SendKeys ("~")
    
    
    End Sub
    But I don't know where to start in getting the B column to increment a number.

    If I,

    
    Sub Start()
    
    Cells(Rows.Count, "A").End(xlUp).Offset(1).Select
    Application.SendKeys ("^;")
    Application.SendKeys ("~")
    
    Cells(Rows.Count, "D").End(xlUp).Offset(1).Select
    Application.SendKeys ("^+;")
    Application.SendKeys ("~")
    
    
    End Sub
    It selects column D and inputs the Date moves down a cell and inputs the time.

    Any help on how to do this an increment the number in Column B would be greatly appreciated.
    Last edited by jeffstu; 09-19-2012 at 11:14 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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