Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Define a variable as date and you can simply do addition substraction
like normal maths. E.g. 1. Below code will display 7 days after current date MsgBox Date + 7 2. Below code assumes that a valid date is already in Cell A2, and puts a date of 7 days later in to cell A3. It shows how to assign the dates to date variables. Dim myDate As Date, myNewDate As Date myDate = Worksheets("Sheet1").Range("A2") myNewDate = myDate + 7 Worksheets("Sheet1").Range("A3") = myNewDate 3. Same as above but without using any variable Worksheets("Sheet1").Range("A3") = Worksheets("Sheet1").Range("A2") + 7 Sharad *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple Pivot Table question - I'm stumped | Excel Discussion (Misc queries) | |||
Simple Calculation within pivot table | Excel Worksheet Functions | |||
Help with simple data table? | New Users to Excel | |||
How do you create formulas in pivot table eg simple division? | Excel Worksheet Functions | |||
Simple table query | Excel Programming |