У меня такая ситуация: учитывая:
Plant A - Plant B ( Route 1)
Plant B - Plant C ( Route 2)
Plant C - Plant D ( Route 3)
Plant D - Customer ( Final route)
из которых:
Plant A ( Starting plant) and Plant D ( ending plant before the customer) are determined
- Plant B , Plant C and Customer are unknown ( also do not need to know)
- Logic: the Ending Plant of 1 route will be the starting plant of the next route ( exp: in route 1, Plant B is the destination plant. In route 2, Plant B will be the Origin Plant)
Основываясь на приведенной выше логике, я хочу написать код на VBA, который позволяет мнеДля отслеживания всего маршрута от Завода А до Заказчика любой маршрут, который выходит за рамки этой логики, необходимо обнаружить, выдав сообщение об ошибке.
Например:
Plant A - Plant B ( Route 1)
Plant B - Plant C ( Route 2)
Plant E - Plant D ( Route 3)
Plant D - Customer ( Final route)
В этомНапример, мы можем видеть, что Маршрут 2 и Маршрут 3 не следуют логике выше, эта ошибка должна быть указана VBA.Кто-нибудь, пожалуйста, дайте мне несколько советов в этом случае?Большое спасибо!