LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Subject: Your Help Needed with the Data List Generation


Below is the code thats supposed to take the given start and end date
and
list all the trading days in between (including the start and end
dates).
The macro is taking the trading days data from DVS Reporter through a
simple formula =DVStradingDay(the start date, 1 (means next one, if u
put 0, it'll show the start date again).

Anyhow, my code gave the start date of the list and the 2nd date but
nothing beyond . Can you help me with that please?

Sub help()

Dim i%
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
Sheets("Sheet4").Select

i = 2
Do
curCell = Cells(i, 3).Select
ActiveCell.FormulaR1C1 = "=dvshandelsdatum(R[-1]C,1)"

If curCell endDate Then Cells(i, 3) = ""
i = i + 1
Loop Until Cells(i, 3).Value = ""

End Sub

The worksheet view:

1/1/2005 start date 1/1/2005
1/3/2005 end date 2/2/2006

Thanks so much.


--
mariasa
------------------------------------------------------------------------
mariasa's Profile: http://www.excelforum.com/member.php...o&userid=31726
View this thread: http://www.excelforum.com/showthread...hreadid=514369

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel List Generation jrthomas Excel Worksheet Functions 0 July 24th 07 03:46 PM
Random List Generation carl Excel Worksheet Functions 4 May 23rd 06 02:18 PM
Automatic List Generation JerryS Excel Worksheet Functions 8 March 15th 06 07:01 PM
Your Help Needed with the Data List Generation alexandraVBAgirl Excel Programming 1 February 20th 06 04:13 PM
Reposting Date List Generation Question alexandraVBAgirl Excel Programming 2 February 17th 06 04:57 PM


All times are GMT +1. The time now is 03:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"