File has 10,000 records, I need to automate this process through VBA. I tried to write a code but i don't know how to approach. Your solutions will be greatly appreciated thanks.
Database has 3 Fields, Policy, Amount and Coverage. Base on Policy field and Amount I need to assign Coverage. If the database doesnt contain duplicate policies i need to assign 01 in coverage field. If it does I need to put 01 in coverage field for that policy and 30 for the next one. If there is a third occurence, then coverage field should have 31.
Note: Smallest Coverage has to be assigned to biggest Amount first.
Database
Policy Amount Coverage
01 20
02 25
03 15
01 40
Policy Amount Coverage
01 20 30
02 25 01
03 15 01
01 40 01
Database has 3 Fields, Policy, Amount and Coverage. Base on Policy field and Amount I need to assign Coverage. If the database doesnt contain duplicate policies i need to assign 01 in coverage field. If it does I need to put 01 in coverage field for that policy and 30 for the next one. If there is a third occurence, then coverage field should have 31.
Note: Smallest Coverage has to be assigned to biggest Amount first.
Database
Policy Amount Coverage
01 20
02 25
03 15
01 40
Policy Amount Coverage
01 20 30
02 25 01
03 15 01
01 40 01