+ Reply to Thread
Results 1 to 5 of 5

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

  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

    Please Login or Register  to view this content.
    But I don't know where to start in getting the B column to increment a number.

    If I,

    Please Login or Register  to view this content.
    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.

  2. #2
    Registered User
    Join Date
    09-19-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    5

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

    Have been trying to get something like this


    select first blank cell column A
    Insert Date
    Select First blank Cell in Column B
    If cell above = a number +1, else if cell above is not a number start from 1
    Select first blank cell in column D
    Enter the Time.

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

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

    jeffstu,

    Welcome to the forum!
    Give this a try, adjust the numberformats to desired:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    09-19-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    5

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

    Awesome,

    Thank you!

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

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

    You're very welcome

+ Reply to Thread

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