I have a large csv/Excel invoice (UPS - not sure if that will matter). I validate and assign missing cost centers every week, using VBA to automate this process.
Usually it is no more complicated than, if x is this cell, then use y cost center.
Here is the problem:
We use a consolidated invoice which contains many different accounts. Sometimes the account is charged a service fee. If so, that service fee is applied to the cost center under the account which had the highest amount of charges.
Here is a stripped-down example.
Because D8
says “Service Fee” I need B8
to equal the cost center with the highest amount of charges. In the case of Account1, CostCenter1 has the most charges at $17.00. For Account2, it will be CostCenter3.
The final product should look like:
I would show some code but I am at a loss of where to start.