Hi, newbie here. I can record a macro and use it, but don't understand the jargon to edit, and started looking into VBA only last week - totally clueless yet totally hooked.
Sorry if similar questions have been asked before. I learn best when I learn by doing, so I hope someone can help me with this.
Below is a sample dataset that needs to be manipulated, and the steps to be taken.
Would it be possible to streamline this, accommodating dynamic datasets?
Steps to sort data:
I hope I have managed to explain everything well, but please let me know if I am missing anything.
Any help would be greatly appreciated, thanks.
Sorry if similar questions have been asked before. I learn best when I learn by doing, so I hope someone can help me with this.
Below is a sample dataset that needs to be manipulated, and the steps to be taken.
Would it be possible to streamline this, accommodating dynamic datasets?
Steps to sort data:
- In ‘Prep’ tab, Filter column D ‘DonationType’ for ‘blanks’
- Copy and paste rows into ‘Gift aid’ tab and delete visible rows in ‘Prep’ tab
- In ‘Gift aid’ tab, create a pivot table with GiftAidAmount by Gift date
- In ‘Prep’ tab, filter column D ‘DonationType’ for ‘Account Donation’, ‘Account Voucher’ or ‘Other Matched Giving’
- Copy and paste rows into ‘Data entry’ tab and delete visible rows in ‘Prep’ tab
- In ‘Prep’ tab, filter Column A ‘DonorName’ for text that contains ‘S/O ANON’ or ‘SO ANON’, copy and paste into ‘Data entry’ tab and delete visible rows in ‘Prep’ tab
- Sort ‘Prep’ tab by ‘Surname’ (Column B)
I hope I have managed to explain everything well, but please let me know if I am missing anything.
Any help would be greatly appreciated, thanks.
VBA test.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | DonorName | Surname | DonationAmount | DonationType | GiftAidAmount | Gift date | ||
2 | LEAHY | LEAHY | 100 | S/O | 0 | 01/07/2020 | ||
3 | Foundation | 500 | Account Voucher | 0 | 03/07/2020 | |||
4 | CHAPMAN | CHAPMAN | 10 | D/D | 0 | 03/07/2020 | ||
5 | BROWN | BROWN | 5 | D/D | 0 | 03/07/2020 | ||
6 | ROBINSON | ROBINSON | 25 | D/D | 0 | 03/07/2020 | ||
7 | DAVIES | DAVIES | 5 | D/D | 0 | 03/07/2020 | ||
8 | Frank | Frank | 25 | Account Regular Donation | 0 | 04/07/2020 | ||
9 | HAIGH | Haigh | 5 | Account Regular Donation | 0 | 04/07/2020 | ||
10 | Smith | Smith | 10 | Account Regular Donation | 0 | 04/07/2020 | ||
11 | M J AY | 5000 | Account Voucher | 0 | 04/07/2020 | |||
12 | MOONEY | MOONEY | 0 | 3 | 04/07/2020 | |||
13 | Henderson | Henderson | 10 | Account Regular Donation | 0 | 07/07/2020 | ||
14 | S/O ANON - xxx | S/O ANON - xxx | 50 | S/O | 0 | 07/07/2020 | ||
15 | GARDNER | GARDNER | 10 | S/O | 0 | 07/07/2020 | ||
16 | S/O ANON - yyy | S/O ANON - yyy | 15 | S/O | 0 | 07/07/2020 | ||
17 | SO ANON - J C G | SO ANON - J C G | 15 | S/O | 0 | 07/07/2020 | ||
18 | STEWART | STEWART | 10 | S/O | 0 | 09/07/2020 | ||
19 | OWEN | OWEN | 5 | S/O | 0 | 15/07/2020 | ||
20 | Colley | Colley | 5 | Account Regular Donation | 0 | 16/07/2020 | ||
21 | GRU | GRUNDY | 0 | 2.5 | 17/07/2020 | |||
22 | PELL | PELL | 0 | 1.25 | 17/07/2020 | |||
23 | DAVIES | DAVIES | 0 | 4 | 17/07/2020 | |||
24 | Purser | Purser | 0 | 1.25 | 17/07/2020 | |||
25 | ELLIS | ELLIS | 0 | 0.5 | 17/07/2020 | |||
26 | Talbot | Talbot | 0 | 3 | 18/07/2020 | |||
27 | Davey | Davey | 0 | 1.25 | 18/07/2020 | |||
28 | MOONEY | MOONEY | 2 | S/O | 0 | 21/07/2020 | ||
29 | BALDWIN | BALDWIN | 3 | D/D | 0 | 25/07/2020 | ||
30 | PELL | PELL | 5 | D/D | 0 | 25/07/2020 | ||
31 | DAVIES | DAVIES | 5 | D/D | 0 | 25/07/2020 | ||
32 | Gilson C | Gilson | 60 | Account Regular Donation | 0 | 27/07/2020 | ||
33 | SO ANON R | SO ANON R | 10 | S/O | 0 | 28/07/2020 | ||
34 | Jackson | Jackson | 20 | Other Matched Giving | 0 | 31/07/2020 | ||
Prep |
VBA test.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | DonorName | Surname | DonationAmount | DonationType | GiftAidAmount | Gift date | ||
2 | ||||||||
3 | ||||||||
4 | ||||||||
Data entry |
VBA test.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | DonorName | Surname | DonationAmount | DonationType | GiftAidAmount | Gift date | ||
2 | ||||||||
3 | ||||||||
4 | ||||||||
Gift aid |