Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Table
I need help creating a small macro. When activated, I want an input box to
come up asking "Week Beginning" & "Week Ending" and fill those dates into a2:a26 (essentially 5 times) ie: 1/1/2005 1/1/2005 --- --- 1/5/2005 1/5.2005 Can someone help me out? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Table
Sorry. I was looking at this all wrong. What I need instead is a way to
just add 7 days to a date thats already in the cell. How do i do that? "Dominique Feteau" wrote in message ... I need help creating a small macro. When activated, I want an input box to come up asking "Week Beginning" & "Week Ending" and fill those dates into a2:a26 (essentially 5 times) ie: 1/1/2005 1/1/2005 --- --- 1/5/2005 1/5.2005 Can someone help me out? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Table
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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 |