Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is the excel ws and the code follows.
1/1/2005 start date 1/1/2005 end date 2/2/2006 This code is supposed to copy the start date, then extract the next trading days date from DVS referencing the start date through the formula, and do so until the trading day date = end date. When it's more than that it should erase the date. So the result should be a list of trading days between and including the start and end dates. However, my code only puts a counter from 2 to 20 - how to you make it from 2 to infinity though? Then when i execute this code, it only copies the start date and doesn't do anything beyond that. Could you guys help me pls? Thanks. Sub click() Dim counter As Integer Dim curCell As Date Dim startDate As Date Dim endDate As Date startDate = Range("e1").Value endDate = Range("e2").Value Range("C1").Select ActiveCell.FormulaR1C1 = startDate For counter = 2 To 20 curCell = Worksheets("sheet3").Cells(counter, 3).FormulaR1C1 = "=dvshandelsdatum(R[-1]C,1)" If curCell endDate Then Cells(counter, 3) = "" Next counter End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display the days between start & end date columns | Excel Discussion (Misc queries) | |||
AFTER ARRIVAL FROM 5TH DAYS TO START CHARGES | Excel Worksheet Functions | |||
HOW DO I SET UP A COUNTDOWN OF DAYS LEFT FROM START TO FINISH. | Setting up and Configuration of Excel | |||
stock chart -- how to include only trading days | Charts and Charting in Excel | |||
VBA Code needed to start different public sub | Excel Programming |