Table
ID Name IssueDate Amount Kept GivenAway
01 John 2002 2000
02 Bryan 2002 3000
01 John 2001 2000
01 John 2003 3000
Guys, I need help with VBA. I need to fill in Kept and GivenAway fields which are initially empty. The criteria is to sort it by IssueDate and keep first 3000 per person give away next 3000. The most can be given away is 3000 everything after that should be kept. I have an irratative solution that puts in array each person, but its really slow. Do you think you can come up with a better solution from your experience. Thanks in advance.
ID Name IssueDate Amount Kept GivenAway
01 John 2002 2000 1000 1000
02 Bryan 2002 3000 3000 0
01 John 2001 2000 2000 0
01 John 2003 3000 1000 2000
ID Name IssueDate Amount Kept GivenAway
01 John 2002 2000
02 Bryan 2002 3000
01 John 2001 2000
01 John 2003 3000
Guys, I need help with VBA. I need to fill in Kept and GivenAway fields which are initially empty. The criteria is to sort it by IssueDate and keep first 3000 per person give away next 3000. The most can be given away is 3000 everything after that should be kept. I have an irratative solution that puts in array each person, but its really slow. Do you think you can come up with a better solution from your experience. Thanks in advance.
ID Name IssueDate Amount Kept GivenAway
01 John 2002 2000 1000 1000
02 Bryan 2002 3000 3000 0
01 John 2001 2000 2000 0
01 John 2003 3000 1000 2000