Skip to Content
avatar image
Former Member

Need to Stop macro when generating the first alert

Hello Gurus,

Users are complaining about the amount of alerts they get. They want to only get one alert per product-location. For instance, the stock is below the safety stock for the next 10 periods so the macro generates 10 alerts. The users want to get only one alert, that is, as soon as the macro is generated for the first period where the stock falls below the safety stock, the macro should continue with the next product-location.

Thanks in advance,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 04, 2017 at 09:34 PM

    Hi David,

    We had exactly same requirement earlier - we solved the issue by using an auxiliary cell in the macro.

    So when the macro runs then it checks the normal alert condition + the value of the auxiliary cell with certain iterations.

    If alert condition is met AND auxiliary cell value is blank/zero then the macro generates DB alert plus set value for auxiliary cell as "1'.

    In fact the iteration still runs thru all buckets trying to create alerts - but because of the aux cell value as "1" no any additional alert is generated for that specific locprod.

    Attached I am sending you the macro we are currently using.

    Best Regards



    Add comment
    10|10000 characters needed characters exceeded

  • Oct 17, 2017 at 05:39 AM


    Similarly you can use a variable in the macro, when the alert condition meets, you set the alert and at the same time set the variable to 'X'.
    The alert should only generate when the variable is not 'X'.
    So anyway this should be controlled in your own macro logic.

    Best Regards,

    Add comment
    10|10000 characters needed characters exceeded