Macro help

Emmily

Well-known Member
Joined
Oct 5, 2008
Messages
676
Hi i have work task which i'm hoping can be automated. The task is to track clients who are on Payment arrangements according to their payment frequency. Every Tuesday I will manually try and work out which clients i need to chase up for payment based on their frequency. I was hoping there is VBA procedure that can be wrtitten so when i run the code it will filter for those specific clients.

Below is sample data

Excel Workbook
ABCDEFGH
1TitleFirst NameLast NameCompany NameTotalInstalmentPayment Start DateFrequency
2MrJamieSmithTest17,846.64100.0029/04/2009Weekly
3MrChristopherBloggsTest25,830.0050.0006/04/2009Weekly
4MrsBrieMastersTest328,633.44500.0008/09/2010Monthly
5MrsBenBuckinghamTest4800.00200.0022/03/2011Monthly
6MrDamienCotTest54,400.00440.0022/03/2011Monthly
7MrPeterPeshTest617,811.00100.0004/03/2011Weekly
8MrNeilSmithTest71,803.00910.0007/07/2011Quarterly
9MrGrantDenyerTest83,960.00330.0008/03/2011Weekly
10MrStevenGerrardTest98,400.00700.0008/03/2011Monthly
11MrGuySebTest104,020.00100.0022/03/2011Fortnightly
Sheet1
 
If i was to run the code on Tuesday 15/03/11 i would expect the code to filter for the highlights rows

Excel Workbook
ABCDEFGH
1TitleFirst NameLast NameCompany NameTotalInstalmentPayment Start DateFrequency
2MrJamieSmithTest17,846.6410029/04/2009Weekly
3MrChristopherBloggsTest25,830.00506/04/2009Weekly
4MrsBrieMastersTest328,633.445008/09/2010Monthly
5MrsBenBuckinghamTest480020022/03/2011Monthly
6MrDamienCotTest54,400.0044022/03/2011Monthly
7MrPeterPeshTest617,811.001004/03/2011Weekly
8MrNeilSmithTest71,803.009107/07/2011Quarterly
9MrGrantDenyerTest83,960.003308/03/2011Weekly
10MrStevenGerrardTest98,400.007008/03/2011Monthly
11MrGuySebTest104,020.0010022/03/2011Fortnightly
Sheet2
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Another few examples.

If i was to run the code on say 22/03/11 or even 23/03/11, i expect the macro to filter for these yellow rows

Excel Workbook
ABCDEFGH
1TitleFirst NameLast NameCompany NameTotalInstalmentPayment Start DateFrequency
2MrJamieSmithTest17,846.6410029/04/2009Weekly
3MrChristopherBloggsTest25,830.00506/04/2009Weekly
4MrsBrieMastersTest328,633.445008/09/2010Monthly
5MrsBenBuckinghamTest480020022/03/2011Monthly
6MrDamienCotTest54,400.0044022/03/2011Monthly
7MrPeterPeshTest617,811.001004/03/2011Weekly
8MrNeilSmithTest71,803.009107/07/2011Quarterly
9MrGrantDenyerTest83,960.003308/03/2011Weekly
10MrStevenGerrardTest98,400.007008/03/2011Monthly
11MrGuySebTest104,020.0010022/03/2011Fortnightly
Sheet2


If i was to run the code on say 29/03/11 or even 30th i would expect the code to filter for these yellow rows

Excel Workbook
ABCDEFGH
1TitleFirst NameLast NameCompany NameTotalInstalmentPayment Start DateFrequency
2MrJamieSmithTest17,846.6410029/04/2009Weekly
3MrChristopherBloggsTest25,830.00506/04/2009Weekly
4MrsBrieMastersTest328,633.445008/09/2010Monthly
5MrsBenBuckinghamTest480020022/03/2011Monthly
6MrDamienCotTest54,400.0044022/03/2011Monthly
7MrPeterPeshTest617,811.001004/03/2011Weekly
8MrNeilSmithTest71,803.009107/07/2011Quarterly
9MrGrantDenyerTest83,960.003308/03/2011Weekly
10MrStevenGerrardTest98,400.007008/03/2011Monthly
11MrGuySebTest104,020.0010022/03/2011Fortnightly
Sheet2
 
Upvote 0
sorry I had not turned the page...
when you run the code on the 15th you 2 monthly dates highlighted with start dates of the 8th of the month...would they not have shown up the week before?
 
Upvote 0
sorry I had not turned the page...
when you run the code on the 15th you 2 monthly dates highlighted with start dates of the 8th of the month...would they not have shown up the week before?

Hi Dryver, the reason why those 2 dates would not have shown before is because the 8th is the payment date and payment would take at least an extra day to come through so the code can never filter for that same day, it will always be week after.
 
Upvote 0
Here is another example if i was to run the code on 05/04/11 i would expect these yellow rows

Excel Workbook
ABCDEFGH
1TitleFirst NameLast NameCompany NameTotalInstalmentPayment Start DateFrequency
2MrJamieSmithTest17,846.6410029/04/2009Weekly
3MrChristopherBloggsTest25,830.00506/04/2009Weekly
4MrsBrieMastersTest328,633.445008/09/2010Monthly
5MrsBenBuckinghamTest480020022/03/2011Monthly
6MrDamienCotTest54,400.0044022/03/2011Monthly
7MrPeterPeshTest617,811.001004/03/2011Weekly
8MrNeilSmithTest71,803.009107/07/2011Quarterly
9MrGrantDenyerTest83,960.003308/03/2011Weekly
10MrStevenGerrardTest98,400.007008/03/2011Monthly
11MrGuySebTest104,020.0010022/03/2011Fortnightly
Sheet2


If i run the code on the 15/04/11 i would expect these yellow rows

Excel Workbook
ABCDEFGH
1TitleFirst NameLast NameCompany NameTotalInstalmentPayment Start DateFrequency
2MrJamieSmithTest17,846.6410029/04/2009Weekly
3MrChristopherBloggsTest25,830.00506/04/2009Weekly
4MrsBrieMastersTest328,633.445008/09/2010Monthly
5MrsBenBuckinghamTest480020022/03/2011Monthly
6MrDamienCotTest54,400.0044022/03/2011Monthly
7MrPeterPeshTest617,811.001004/03/2011Weekly
8MrNeilSmithTest71,803.009107/07/2011Quarterly
9MrGrantDenyerTest83,960.003308/03/2011Weekly
10MrStevenGerrardTest98,400.007008/03/2011Monthly
11MrGuySebTest104,020.0010022/03/2011Fortnightly
Sheet2
 
Upvote 0
Emmily, can you explain the exact logic you used in highlighting those rows based on those dates?
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,722
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top