I was assigned to fill in a column of costs in a 120,000 line table. Quite basically, I imported the data including the costs from excel into access (table 1), and used an update query to match the cost's position and update table 2 as necessary.
There were two types of data I was pulling from the table 1 and using to match position in the table, delivery numbers and shipment numbers. Every record provided only one number, either delivery or shipment. I matched the delivery numbers successfully. However, because there are several deliveries to a shipment, the records that provided only the shipment numbers are incorrect. It filled in the same cost for several different deliveries of the same shipment. This is to be expected. I solve this problem using the following method.
Another piece of information included in the record is its weight. My job is to distribute the cost of each shipment according to the percent of the total weight each delivery makes up. For example: Object one weighs 2 lbs, object two weighs 6 lbs, the cost is $10. Object one would get $2.50 of the cost, object two would get $7.50. Pretty simple.
I put together a quick Excel spreadsheet that I plug the weights and cost into and I get the cost per unit. Then I copy and paste those back into the table. This is a long manual process and will probably wear out my control, c, v keys, as well as my sanity.
Does all this make sense?
My question is, what can I possibly do to automate this process? Is VBA the answer? Is there an Access function of some sort? Do I link the Excel sheet? I need some guidance on what to do for this problem. Thank you for any help you can offer. And I also appreciate you sitting and reading through this novel of a post.
There were two types of data I was pulling from the table 1 and using to match position in the table, delivery numbers and shipment numbers. Every record provided only one number, either delivery or shipment. I matched the delivery numbers successfully. However, because there are several deliveries to a shipment, the records that provided only the shipment numbers are incorrect. It filled in the same cost for several different deliveries of the same shipment. This is to be expected. I solve this problem using the following method.
Another piece of information included in the record is its weight. My job is to distribute the cost of each shipment according to the percent of the total weight each delivery makes up. For example: Object one weighs 2 lbs, object two weighs 6 lbs, the cost is $10. Object one would get $2.50 of the cost, object two would get $7.50. Pretty simple.
I put together a quick Excel spreadsheet that I plug the weights and cost into and I get the cost per unit. Then I copy and paste those back into the table. This is a long manual process and will probably wear out my control, c, v keys, as well as my sanity.
Does all this make sense?
My question is, what can I possibly do to automate this process? Is VBA the answer? Is there an Access function of some sort? Do I link the Excel sheet? I need some guidance on what to do for this problem. Thank you for any help you can offer. And I also appreciate you sitting and reading through this novel of a post.
Comment