Shantanu_4612
New Member
- Joined
- Oct 3, 2016
- Messages
- 27
I am a newbie in vba and I am trying to get in vba all dates between 2 dates, for example I will call the function with the parameters 01-01-2015 and 15-01-2015, and I will get in return an array with all the dates possibles, i.e :
This is the Data that I have;
<tbody>
[TD="class: xl71"]ID[/TD]
[TD="class: xl72, width: 73"]Start Date[/TD]
[TD="class: xl72, width: 73"]End Date[/TD]
[TD="class: xl73, width: 103"]Code[/TD]
[TD="class: xl68, align: right"]1234567[/TD]
[TD="class: xl69, align: right"]03-10-2016[/TD]
[TD="class: xl69, align: right"]15-10-2016[/TD]
[TD="class: xl70"]ABC_987654321[/TD]
[TD="class: xl65, align: right"]3456789[/TD]
[TD="class: xl66, align: right"]10-09-2016[/TD]
[TD="class: xl66, align: right"]20-09-2016[/TD]
[TD="class: xl67"]ABC_123456789[/TD]
</tbody>
The Result should be as below, and should stop when finds blanks in start date
[TABLE="width: 232"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD="align: right"]1234567[/TD]
[TD="align: right"]03-10-2016[/TD]
[TD]ABC_987654321[/TD]
[/TR]
[TR]
[TD="align: right"]1234567[/TD]
[TD="align: right"]04-10-2016[/TD]
[TD]ABC_987654321[/TD]
[/TR]
[TR]
[TD="align: right"]1234567[/TD]
[TD="align: right"]05-10-2016[/TD]
[TD]ABC_987654321[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]10-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]11-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]12-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]13-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]14-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]15-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]16-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]17-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]18-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]19-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]20-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
</tbody>[/TABLE]
Please help me with this its a bit urgent, my job is on stake
This is the Data that I have;
<tbody>
[TD="class: xl71"]ID[/TD]
[TD="class: xl72, width: 73"]Start Date[/TD]
[TD="class: xl72, width: 73"]End Date[/TD]
[TD="class: xl73, width: 103"]Code[/TD]
[TD="class: xl68, align: right"]1234567[/TD]
[TD="class: xl69, align: right"]03-10-2016[/TD]
[TD="class: xl69, align: right"]15-10-2016[/TD]
[TD="class: xl70"]ABC_987654321[/TD]
[TD="class: xl65, align: right"]3456789[/TD]
[TD="class: xl66, align: right"]10-09-2016[/TD]
[TD="class: xl66, align: right"]20-09-2016[/TD]
[TD="class: xl67"]ABC_123456789[/TD]
</tbody>
The Result should be as below, and should stop when finds blanks in start date
[TABLE="width: 232"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD="align: right"]1234567[/TD]
[TD="align: right"]03-10-2016[/TD]
[TD]ABC_987654321[/TD]
[/TR]
[TR]
[TD="align: right"]1234567[/TD]
[TD="align: right"]04-10-2016[/TD]
[TD]ABC_987654321[/TD]
[/TR]
[TR]
[TD="align: right"]1234567[/TD]
[TD="align: right"]05-10-2016[/TD]
[TD]ABC_987654321[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]10-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]11-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]12-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]13-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]14-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]15-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]16-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]17-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]18-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]19-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
[TR]
[TD="align: right"]3456789[/TD]
[TD="align: right"]20-09-2016[/TD]
[TD]ABC_123456789[/TD]
[/TR]
</tbody>[/TABLE]
Please help me with this its a bit urgent, my job is on stake