Hi,
I am a novice user when it comes to VBA, so any help will be greatly appreciated. This is what I'm trying to do:
In my excel work sheet, column A is my start date, column B is my end date and column C are dollar amounts. For example,
31-Jan-03 03-Feb-03 3
03-Dec-02 03-Feb-03 62
03-Jan-03 05-Feb-03 33
27-Dec-02 05-Feb-03 40
06-Nov-02 05-Feb-03 91
06-Jan-03 06-Feb-03 31
31-Jan-03 07-Feb-03 7
03-Feb-03 10-Feb-03 7
07-Jan-03 12-Feb-03 36
13-Nov-02 12-Feb-03 91
07-Feb-03 13-Feb-03 6
06-Feb-03 14-Feb-03 8
08-Jan-03 17-Feb-03 40
18-Nov-02 17-Feb-03 91
20-Nov-02 18-Feb-03 90
13-Feb-03 19-Feb-03 6
19-Nov-02 19-Feb-03 92
19-Feb-03 20-Feb-03 1
21-Jan-03 20-Feb-03 30
24-Jan-03 21-Feb-03 28
23-Jan-03 21-Feb-03 29
22-Jan-03 21-Feb-03 30
21-Jan-03 21-Feb-03 31
In column D, I have a series of dates (i.e. 1-feb-03, 2-feb-03, 3-feb-03....21-feb-03).
Okay, here's what I want to do. For each date in column D, I want to find if it is contained in each range (i.e. row 1, row 2, etc). If it is contained in that range, I want to grab the value in column C, sum them up and spit out the result beside the respective date in column E.
Too make it more confusing...I will be adding more date ranges to the list, so the loop has to work to accomodate this, so I was thinking that a "IsNotEmpty" funtion would work.
I have no idea where to begin....PLEASE help!
nik
I am a novice user when it comes to VBA, so any help will be greatly appreciated. This is what I'm trying to do:
In my excel work sheet, column A is my start date, column B is my end date and column C are dollar amounts. For example,
31-Jan-03 03-Feb-03 3
03-Dec-02 03-Feb-03 62
03-Jan-03 05-Feb-03 33
27-Dec-02 05-Feb-03 40
06-Nov-02 05-Feb-03 91
06-Jan-03 06-Feb-03 31
31-Jan-03 07-Feb-03 7
03-Feb-03 10-Feb-03 7
07-Jan-03 12-Feb-03 36
13-Nov-02 12-Feb-03 91
07-Feb-03 13-Feb-03 6
06-Feb-03 14-Feb-03 8
08-Jan-03 17-Feb-03 40
18-Nov-02 17-Feb-03 91
20-Nov-02 18-Feb-03 90
13-Feb-03 19-Feb-03 6
19-Nov-02 19-Feb-03 92
19-Feb-03 20-Feb-03 1
21-Jan-03 20-Feb-03 30
24-Jan-03 21-Feb-03 28
23-Jan-03 21-Feb-03 29
22-Jan-03 21-Feb-03 30
21-Jan-03 21-Feb-03 31
In column D, I have a series of dates (i.e. 1-feb-03, 2-feb-03, 3-feb-03....21-feb-03).
Okay, here's what I want to do. For each date in column D, I want to find if it is contained in each range (i.e. row 1, row 2, etc). If it is contained in that range, I want to grab the value in column C, sum them up and spit out the result beside the respective date in column E.
Too make it more confusing...I will be adding more date ranges to the list, so the loop has to work to accomodate this, so I was thinking that a "IsNotEmpty" funtion would work.
I have no idea where to begin....PLEASE help!
nik