Sunday, June 21, 2015

excel 2007 enter new date

I’m try to create a excel template which will have three fields I like to update automatically when it’s open.


Fields which this template will have



  • Current Date: 02/07/2012

  • Sheet Number: 25

  • Between Date: 02/07/2012 to 02/08/2012


When I open this template after 03/08/2012 this sheet will have new data



  • Current Date: 03/08/2012

  • Sheet Number: 26

  • Between Date: 03/08/2012 to 02/09/2012


For current date


Private Sub Workbook_Open()
ThisWorkbook.Worksheets("Sheet1").Range("A1").Value = Date
End Sub

Can this be done using excel function or do I need to use VB and also how do I update template automatically with new values to say next time use these dates.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...