Dear All,
I have encounter some problem with the VBA coding. My situation is this, I have a set of data which consist of records of purchase. Let say customer A can have multiple entries in the database if he has more than one purchase. I am able to sort the record and group the duplicate records together. My problem is this There is a limit for which each customer can purchase so i need to know whether the purchase has exceed the limit.
For example customer A has 3 purchases and the limit is $1000. For the 1st purchase is $800, 2nd is $150 and 3rd is $300. So in the column beside these 3 entries, I need something like this. For the first entry show $800 (since it is still within the allow limit) and for second entry show $150(since $800 + $150 = $950 and is still within the limit) and third entry show $50 and will show the exceed amount of $250 (since the 3rd purchase is $300 and he only left with $50 credit).
I would appreciate anyone who can help me solve this problem either by using excel formula or VBA. Thanks a millions in advance.
From Caprichoo
I have encounter some problem with the VBA coding. My situation is this, I have a set of data which consist of records of purchase. Let say customer A can have multiple entries in the database if he has more than one purchase. I am able to sort the record and group the duplicate records together. My problem is this There is a limit for which each customer can purchase so i need to know whether the purchase has exceed the limit.
For example customer A has 3 purchases and the limit is $1000. For the 1st purchase is $800, 2nd is $150 and 3rd is $300. So in the column beside these 3 entries, I need something like this. For the first entry show $800 (since it is still within the allow limit) and for second entry show $150(since $800 + $150 = $950 and is still within the limit) and third entry show $50 and will show the exceed amount of $250 (since the 3rd purchase is $300 and he only left with $50 credit).
I would appreciate anyone who can help me solve this problem either by using excel formula or VBA. Thanks a millions in advance.
From Caprichoo