Results 1 to 2 of 2
2001-07-11, 14:36 #1SLCGuest
Macro with input box to choose range of dates (Excel 2000)
I have 2 years worth of data in an excel spreadsheet (therefore, 104 rows of data because I have data for each week).
I want to create a macro that asks me the starting and ending week through an input box and then creates the graph based on this input. For example, I will put 1-Jul-00 as the starting date and 1-Jul-01 as the ending date so the graph will only contain data from July1/00 to July1/01. I have no problem creating a macro to make a static graph but don't know how to add the variable to be able to choose different time periods. Confusing? Help!!
2001-07-11, 16:41 #2
- Join Date
- Jan 2001
- South Carolina, USA
- Thanked 0 Times in 0 Posts
Re: Macro with input box to choose range of dates (Excel 2000)
Is this what you need?
<pre>Dim dStart As Date, dEnd As Date
dStart = DateValue(InputBox("Please enter starting date"))
dEnd = DateValue(InputBox("Please enter ending date"))
If you want to make it look pretty and enter both dates at one time you could also create a user form.Legare Coleman