Current Date in New cell everytime

  • Hi Experts,


    I am new to writing macros in Excel. Hope you can help me out. My current requirement is to get the current date in a new cell everytime I click on a button. For. E.g. If I click on the button the current date should be populated in A1, then when I click on the button again the macro should check if B1 is empty or not if empty then current date in there and so on..


    Regards
    Anuj

  • Will the date always be inserted into row 1? You want to insert the date into the cell to the right of the one you clicked if it is empty. Is this correct?

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • yes that is correct. Also the macro should check if the date for today has already been entered once in the previous cell, than it should not enter the same date again in new cell.

  • Try:


    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Thank You very much Mumps...it really helped me. Now I am just trying to changing the code to start from cell C2 and in sheet "Summary".

  • You are very welcome. :)

    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!